I have checked the progressive rewards example on git hub and the cloudscript is js. I am currently working on Azure functions and want to know how I can get the time stamp and store it in player data.
I have checked the progressive rewards example on git hub and the cloudscript is js. I am currently working on Azure functions and want to know how I can get the time stamp and store it in player data.
If by get the time stamp you mean get the current time, you can use DateTime.Now in your code to obtain the current time then call Update User Read Only Data API to store it in player data. In addition, since you want to store the time stamp in the player data, and the data in the player data has a LastUpdated property that records the times tamp of the last modification of that data, you can also use this time stamp in your code. You can call Get User Read Only Data API to obtain the timestamp.
The thing is in VS Code, I am not able to use most of the api. Is it possible for me to use all these api calls in azure function or is it something wrong from my side?
Yes, you can use all of these API calls in Azure Functions. Also, if you're building your game with Unity, calling the server API on the client requires enabling the server API in the PlayFab extension, but we don't recommend this because it exposes the Secret Key, which is not secure.
17 People are following this question.
Cloudscript update player data only for not existing keys
PayPal Return Link Parameters and HTML5 Implementation
Trying to save the time a new player linked its Facebook account
Query Number of Players Based on User Data Criteria (using CloudScript)
How to give player EXP after battle? and How to reward player after level up?