async Task <ProfileStoreItems> IProfileStoreService.GetProfiles(string queryString) { HttpResponseMessage response; var profileStoreItems = new ProfileStoreItems(); var uri = $"{apiBaseUrl}/{profilesUrl}/{queryString}"; response = await Request(HttpMethod.Get, uri); var getProfileStoreItems = await response.Content.ReadAsStringAsync(); if (string.IsNullOrEmpty(getProfileStoreItems)) { profileStoreItems = new ProfileStoreItems() { ProfileStoreList = new List <ProfileStoreModel>(), Total = 0, Count = 0 }; } else { profileStoreItems = JsonConvert.DeserializeObject <ProfileStoreItems>(getProfileStoreItems); } return(profileStoreItems); }
async Task <ProfileStoreItems> IProfileStoreService.GetAllProfiles(ProfileStoreFilterOptions profileStoreFilterOptions) { HttpResponseMessage response = null; var profileStoreItems = new ProfileStoreItems(); if (profileStoreFilterOptions == null) { response = await Request(HttpMethod.Get, $"{apiBaseUrl}/{profilesUrl}/"); } else { response = await Request(HttpMethod.Get, $"{apiBaseUrl}/{profilesUrl}/{CreateFilterOptionsUrl(profileStoreFilterOptions)}"); } var getProfiles = await response.Content.ReadAsStringAsync(); if (string.IsNullOrEmpty(getProfiles)) { profileStoreItems = new ProfileStoreItems() { ProfileStoreList = new List <ProfileStoreModel>(), Total = 0, Count = 0 }; } else { profileStoreItems = JsonConvert.DeserializeObject <ProfileStoreItems>(getProfiles); } return(profileStoreItems); }