Hello,
I am trying to make a GetUserPublisherDataRequest in Unity but it is not recognized. Am I missing something?
Thanks,
jrDev
Hello,
I am trying to make a GetUserPublisherDataRequest in Unity but it is not recognized. Am I missing something?
Thanks,
jrDev
No, I was saying that in our SDKs, all GetUser...Data API (where the ellipsis replaces the details, like "Publisher" or "ReadOnly") calls use the same class for their request input: GetUserDataRequest. In other words, specific to your original question, there is no "GetUserPublisherDataRequest". You use GetUserDataRequest as the input to the GetUserPublisherData API call.
In response, they all return a GetUserDataResult, containing the data you've requested.
Actually, there's an example of GetUserData in the Unity SDK examples:
To make the call to any of the other user data types, you'd just change the call, but not the request type. So in other words, here's the call in the example:
public static void GetUserData()
{
var getRequest = new ClientModels.GetUserDataRequest();
getRequest.PlayFabId = PfSharedModelEx.globalClientUser.playFabId; // You may ask for yourself specifically, any other playFabId you're aware of, or null to default to yourself
// getRequest.Keys = new System.Collections.Generic.List<string>() { filterKey };
PlayFabClientAPI.GetUserData(getRequest, GetUserDataCallback, PfSharedControllerEx.FailCallback("GetUserData"));
}
To make this call for GetUserPublisherData, you could make it like so:
public static void GetUserPublisherData()
{
var getRequest = new ClientModels.GetUserDataRequest();
getRequest.PlayFabId = PfSharedModelEx.globalClientUser.playFabId; // You may ask for yourself specifically, any other playFabId you're aware of, or null to default to yourself
// getRequest.Keys = new System.Collections.Generic.List<string>() { filterKey };
PlayFabClientAPI.GetUserPublisherData(getRequest, GetUserPublisherDataCallback, PfSharedControllerEx.FailCallback("GetUserPublisherData"));
}
No one has followed this question yet.