//GET https://functionURL/api/scores/:scoreId public void ListScore(string scoreId, Action<CallbackResponse<Score>> callback) { Utilities.ValidateForNull(scoreId, callback); StartCoroutine(GetStuffSingle<Score>("/scores/" + scoreId, callback)); }
//GET https://functionURL/api/users/surroundingbyscore/:userId/:count public void ListUsersSurroundingByScore(string userId, int count, Action<CallbackResponse<User[]>> callback) { //skipping is not relevant here Utilities.ValidateForNull(userId, callback); StartCoroutine(GetStuffArray<User>("/users/surroundingbyscore/" + userId + "/" + count, 0, callback)); }
//GET https://functionURL/api/users/toptotaltimesplayed/:count public void ListTopScorePerUser(int count, Action<CallbackResponse<User[]>> callback, int skipCount = 0) { Utilities.ValidateForNull(callback); StartCoroutine(GetStuffArray<User>("/users/toptotaltimesplayed/" + count, skipCount, callback)); }
//GET https://functionURL/api/scores/latest/:count public void ListLatestScores(int count, Action<CallbackResponse<Score[]>> callback, int skipCount = 0) { Utilities.ValidateForNull(callback); StartCoroutine(GetStuffArray<Score>("/scores/latest/today/" + count, skipCount, callback)); }
//GET https://functionURL/api/users/maxscore/:count public void ListTopScorePerUser(int count, int skipCount, Action<CallbackResponse<Score[]>> callback) { Utilities.ValidateForNull(callback); StartCoroutine(GetStuffArray<Score>("/users/maxscore/" + count, skipCount, callback)); }
//GET https://functionURL/api/user/scores/:count public void ListScoresForCurrentUser(int count, int skipCount, Action<CallbackResponse<Score[]>> callback) { Utilities.ValidateForNull(callback); StartCoroutine(GetStuffArray<Score>("/user/scores/" + count, skipCount, callback)); }
//GET https://functionURL/api/users/:userId public void GetUserDetails(string userID, Action<CallbackResponse<User>> callback) { Utilities.ValidateForNull(userID, callback); StartCoroutine(GetStuffSingle<User>("/users/" + WWW.EscapeURL(userID), callback)); }
//POST https://functionURL/api/scores public void CreateScore(Score instance, Action<CallbackResponse<User>> oncreateScoreCompleted) { Utilities.ValidateForNull(instance, oncreateScoreCompleted); StartCoroutine(PostScoreInternal(instance, oncreateScoreCompleted)); }
void Awake() { Instance = this; Utilities.ValidateForNull(Url); }