public async Task <ListOfCustomers> ListOfCustomers(ListCustomersParams @params) { Authenticated(); HttpResponseMessage responseMessage; if (@params != null) { string queryString = await GenerateQueryString(@params); responseMessage = await _client.GetAsync("https://api.vhx.tv/customers" + queryString); } else { responseMessage = await _client.GetAsync("https://api.vhx.tv/customers"); } if (responseMessage.IsSuccessStatusCode) { string content = await responseMessage.Content.ReadAsStringAsync(); return(JsonConvert.DeserializeObject <ListOfCustomers>(content)); } else { throw NotSuccessCode(responseMessage).Result; } }
public async Task <ListOfCustomers> ListOfCustomers(ListCustomersParams @params) { return(await _resources.ListOfCustomers(@params)); }