public Task <ICollectionPage <Change> > GetChangesAsync(ChangeQuery query)
 {
     return(this.GetChangesAsync(query, CancellationToken.None));
 }
 public async Task <ICollectionPage <Change> > GetChangesAsync(ChangeQuery query, CancellationToken cancellationToken)
 {
     return(await ChangeLogRequest.GetChangesAsync(this, query, cancellationToken).ConfigureAwait(false));
 }
        internal static async Task <ICollectionPage <Change> > GetChangesAsync(BaseRequest request, ChangeQuery query, CancellationToken cancellationToken)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            request.AppendSegmentToRequestUrl("GetChanges");
            request.Method      = HttpMethod.Post.Method;
            request.ContentType = "application/json";

            var req = new GetChangesRequest()
            {
                Query = query
            };
            var response = await request.SendAsync <GetCollectionResponse <Change> >(req, cancellationToken).ConfigureAwait(false);

            if (response != null && response.Value != null && response.Value.CurrentPage != null)
            {
                return(response.Value);
            }

            return(null);
        }