Exemplo n.º 1
0
            public static async Task Revoke(int id)
            {
                RequireAuthenticated("Attempt to revoke trophy without an authenticated user.");
                Debug.Log($"Revoking trophy {id}...");
                await APIRequest("trophies/remove-achieved/", new string[] { $"username={UserName}", $"user_token={UserToken}", $"trophy_id={id}" });

                Debug.Log("Trophy revoked.");
                OnTrophy?.Invoke(TrophyEventType.Revoke, id);
            }
Exemplo n.º 2
0
            public static async Task Grant(int id)
            {
                RequireAuthenticated("Attempt to grant trophy without an authenticated user.");
                Debug.Log($"Granting trophy {id}...");
                await APIRequest("trophies/add-achieved/", new string[] { $"username={UserName}", $"user_token={UserToken}", $"trophy_id={id}" });

                Debug.Log("Trophy granted.");
                OnTrophy?.Invoke(TrophyEventType.Grant, id);
            }