public async Task <Acknowledgment> DeleteAllAsync(IRestCollectionQuery query) { using (HttpClient client = HttpClientCreator.Create()) { var queryStringBuilder = new CollectionQueryStringBuilder(new CollectionQueryStringConfiguration()); string fullUrl = UriUtilities.AppendQueryString(Path, queryStringBuilder.BuildString(query)); HttpResponseMessage response = await client.DeleteAsync(fullUrl); Acknowledgment acknowledgment = await EnsureSuccessAsync(response); return(acknowledgment); } }
public async Task <RestCollectionData> QueryDataAsync(IRestCollectionQuery query) { using (HttpClient client = HttpClientCreator.Create()) { var queryStringBuilder = new CollectionQueryStringBuilder(new CollectionQueryStringConfiguration()); string fullUrl = UriUtilities.AppendQueryString(Path, queryStringBuilder.BuildString(query)); HttpResponseMessage response = await client.GetAsync(fullUrl); var queriedData = await Serializer.DeserializeAsync <IEnumerable <RestItemData> >(response); return(new RestCollectionData(queriedData, null)); // TODO: fill page details } }