You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a function in the WinPage that gets called as soon as the page is loaded
This function should make a POST api call as shown with the details below
This function is responsible for storing the scores in the database table, no UI change is needed
If you make a POST API call to this URL: https://script.google.com/macros/s/AKfycbyYixMarhPEUj3UVzOxWne1bJnMZDOcXUn3dHA4UrP21L_qA673bCkeG6Liys7c6oj5PA/exec
This is the body that you will send, along with the response you should expect:
So the code MIGHT look something like this, I m not sure. Ask @amiraelsayedbadwy for help on this if you have any issue
private async Task GetApiCall()
{
var url = "https://script.google.com/macros/s/AKfycbyYixMarhPEUj3UVzOxWne1bJnMZDOcXUn3dHA4UrP21L_qA673bCkeG6Liys7c6oj5PA/exec";
var client = new HttpClient();
var data = ..... (something that you 'll need to figure out)
var response = await client.PostAsync(url, data);
var result = await response.Content.ReadAsStringAsync();
var scoreItems = JsonConvert.DeserializeObject<List<ScoreItem>>(result);
}
If you make a POST API call to this URL:
https://script.google.com/macros/s/AKfycbyYixMarhPEUj3UVzOxWne1bJnMZDOcXUn3dHA4UrP21L_qA673bCkeG6Liys7c6oj5PA/exec
This is the body that you will send, along with the response you should expect:

So the code MIGHT look something like this, I m not sure. Ask @amiraelsayedbadwy for help on this if you have any issue
Here's the article for reference https://medium.com/@prototypemakers/simplest-universal-free-game-leaderboard-with-google-sheets-5ab548db009f
Allotted Time: 4 hrs
Time Taken: 2 hrs
features/59-LeaderboardPage-PostAPICall
The text was updated successfully, but these errors were encountered: