Esempio n. 1
0
        public static async Task <List <UserModel> > GetCurrentUserFriends()
        {
            string result = await ApiManager.ExecuteGetRequest("api/friends",
                                                               new Dictionary <string, string>
            {
                ["userId"] = DataStoreManager.SharedManager.CurrentUser.Id
            });

            List <UserModel> friends = JsonUtil.DeserializeObject <List <UserModel> >(result);

            return(friends);
        }
Esempio n. 2
0
        public static async Task <UserModel> Login(string login, string pass)
        {
            string result = await ApiManager.ExecutePostRequest("api/loginapi",
                                                                new Dictionary <string, string>
            {
                ["login"]    = login,
                ["password"] = pass
            });

            UserModel user = null;

            user = JsonUtil.DeserializeObject <UserModel>(result);
            return(user);
        }