-
-
Save JoshuaStrunk/4b9a771de26a73e4842f8cf5a9a71823 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The line of code that uses ClientAPI to execute the example cloudscript | |
This assumes playerData00 is a string defined elsewhere and | |
allTitleData.Data is a Dictionary<string,object> defined elsewhere | |
*/ | |
PlayFabClientAPI.ExecuteCloudScript( | |
new ExecuteCloudScriptRequest(){ | |
FunctionName = "exampleSetTitleData", | |
FunctionParameter = new //This is a C# Object with an Anonyommous Type see https://msdn.microsoft.com/en-us/library/bb397696.aspx DO NOT USE new object {} | |
{ | |
Key = playerData00, | |
Value = allTitleData.Data["titleData00"] | |
}, | |
RevisionSelection = CloudScriptRevisionOption.Latest | |
}, | |
result => { //Handle the result from your cloudscript here or don't you do you }, | |
error => { | |
/* | |
Handle any errors that resulted from the API call HUGE NOTE THIS DOES | |
NOT GET CALLED IN THE EVENT OF AN EXPECTION IN YOUR CLOUDSCRIPT | |
*/ | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment