private static string BuildQueryString(GetEntriesRequest request)
        {
            var parameters = new Dictionary <string, string>();

            AddConverterParameter(
                parameters,
                "status",
                request.EntryStatus,
                EntryStatus.None,
                EnumConverters.EntryStatusConverter);
            AddNullableParameter(parameters, "offset", request.Offset);
            AddNullableParameter(parameters, "limit", request.Limit);
            AddConverterParameter(
                parameters,
                "order",
                request.SortingOption,
                SortingOption.None,
                EnumConverters.SortingOptionConverter);
            AddConverterParameter(
                parameters,
                "direction",
                request.SortingDirection,
                SortingDirection.None,
                EnumConverters.SortingDirectionConverter);
            AddNullableParameter(parameters, "before", request.Before);
            AddNullableParameter(parameters, "after", request.After);
            AddNullableParameter(parameters, "before_entry_id", request.BeforeEntryId);
            AddNullableParameter(parameters, "after_entry_id", request.AfterEntryId);
            AddBoolParameter(parameters, "starred", request.Starred);
            AddStringParameter(parameters, "search", request.Search);
            AddNullableParameter(parameters, "category_id", request.CategoryId);

            return(parameters.Any() ? "?" + string.Join("&", parameters.Select(x => $"{x.Key}={Uri.EscapeUriString(x.Value)}")) : string.Empty);
        }
        public async Task <EntryList> GetEntriesAsync(GetEntriesRequest request)
        {
            if (request is null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            var query = BuildQueryString(request);

            return(await this.GetRequest <EntryList>($"/v1/entries{query}").ConfigureAwait(false));
        }