Esempio n. 1
0
        public void CorrectRequestForGet()
        {
            var factory = Substitute.For <IConnection>();
            var client  = new AccountClient(factory);

            client.Get();

            factory.Received().ExecuteRequest <Account>("account", null, null, "account");
        }
Esempio n. 2
0
        public async Task FetchUserCreditsAsync()
        {
            try
            {
                if (!SignedIn)
                {
                    return;
                }

                var response = await AccountClient.Get();

                if (response != null && response.Success && response.Data != null)
                {
                    var user = response.Data.ToObject <User>();
                    UserInfo.Credits = user.Credits;
                }
            }
            catch (Exception ex)
            {
                LoggerService.Instance.Log("ERROR: Account.FetchUserCreditsAsync: " + ex);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Returns agenda's logo.
 /// </summary>
 /// <returns>Agenda's logo.</returns>
 public ApiResult <LogoGetModel> GetLogo()
 {
     return(_client.Get <LogoGetModel>(LogoUrl));
 }