public void CorrectRequestForGet() { var factory = Substitute.For <IConnection>(); var client = new AccountClient(factory); client.Get(); factory.Received().ExecuteRequest <Account>("account", null, null, "account"); }
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); } }
/// <summary> /// Returns agenda's logo. /// </summary> /// <returns>Agenda's logo.</returns> public ApiResult <LogoGetModel> GetLogo() { return(_client.Get <LogoGetModel>(LogoUrl)); }