public async Task <ListSuppressionResponse> List(string url, SuppressionsQuery supppressionsQuery) { var request = new Request { Url = url, Method = "GET", Data = (object)supppressionsQuery ?? new { } }; var response = await requestSender.Send(request); if (response.StatusCode != HttpStatusCode.OK) { throw new ResponseException(response); } var content = Jsonification.DeserializeObject <dynamic>(response.Content); return(new ListSuppressionResponse { ReasonPhrase = response.ReasonPhrase, StatusCode = response.StatusCode, Content = response.Content, Suppressions = ConvertResultsToAListOfSuppressions(content.results), TotalCount = content.total_count, Links = ConvertToLinks(content.links) }); }
public async Task <ListSuppressionResponse> List(SuppressionsQuery supppressionsQuery) { return(await List(supppressionsQuery as object)); }
public async Task <ListSuppressionResponse> List(SuppressionsQuery supppressionsQuery) { return(await this.List($"/api/{client.Version}/suppression-list", supppressionsQuery)); }