question

KeitaTomiyasu avatar image
KeitaTomiyasu asked

call GetTitleDataRequest. result=NULL

i call GetTitleDataRequest. but, return result NULL.

i play this URL.

https://api.playfab.com/docs/general-getting-started

this document write "leave null to get all keys".

but, i cant GetTitleData...

https://api.playfab.com/documentation/Client/datatype/PlayFab.Client.Models/PlayFab.Client.Models.GetTitleDataRequest

code

---------------------------------------------------------------------

var request = new GetTitleDataRequest { Keys = {} };

var result = new GetTitleDataResult { };

Debug.Log(request.Keys);

Debug.Log(result.Data);

---------------------------------------------------------------------

confirm

Congratulations, you made your first successful API call!

unity3d
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KeitaTomiyasu avatar image KeitaTomiyasu commented ·

thanks.

i don look methods.

thank you for the polite explanation.

0 Likes 0 ·

1 Answer

·
v-humcin avatar image
v-humcin answered

After you create the "GetTitleDataRequest" you then have to pass it as an argument into the GetPlayerData API call found in PlayFabClientAPI. This will execute the request and you will receive the "GetTitleDataResult" in the success callback.

This is one example demonstrating the relationship between the request, API call, and result.

 public void LoadTitleData()
    {
        var request = new GetTitleDataRequest {};
        PlayFabClientAPI.GetTitleData(request, OnGetTitleDataSuccess, OnError);
    }
 private void OnGetTitleDataSuccess(GetTitleDataResult result)
    {
        Debug.Log("Title Data Received");
    }
 private void OnError(PlayFabError error)
    {
        Debug.Log("An Error Occurred");
    }

We have a new documentation site that goes over Title Data in more depth and shows other examples of how to structure these API calls, which can be found here: https://docs.microsoft.com/en-us/gaming/playfab/features/config/titledata/quickstart

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KeitaTomiyasu avatar image KeitaTomiyasu commented ·

@Hunter McIntyre

thanks.

i don look methods.

thank you for the polite explanation.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.