예제 #1
0
        private static async Task Resubscribe(User user)
        {
            user.CurrentlySubscribed = true;

            await UserHttpMethods.UpdateUser(_client, user);

            Console.WriteLine("Successfully resubscribed.");
        }
예제 #2
0
        private static async Task Unsubscribe(int userId)
        {
            User currentUser = JsonConvert.DeserializeObject <User>(await UserHttpMethods.GetUserById(_client, userId));

            currentUser.CurrentlySubscribed = false;

            await UserHttpMethods.UpdateUser(_client, currentUser);

            Console.WriteLine("Successfully unsubscribed.");
        }