Skip to content

Commit

Permalink
Merge pull request #135 from hognevevle/main
Browse files Browse the repository at this point in the history
Change `PageSize` property from `string` to `int?` 🐛
  • Loading branch information
KoditkarVedant authored Sep 28, 2021
2 parents 79434f1 + e4029a6 commit 7e86091
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
public class BlocksRetrieveChildrenParameters : IBlocksRetrieveChildrenQueryParameters
{
public string StartCursor { get; set; }
public string PageSize { get; set; }
public int? PageSize { get; set; }
}
}
2 changes: 1 addition & 1 deletion Src/Notion.Client/Api/Databases/DatabasesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task<PaginatedList<Database>> ListAsync(DatabasesListParameters dat
var queryParams = new Dictionary<string, string>()
{
{ "start_cursor", databasesListQueryParmaters?.StartCursor },
{ "page_size", databasesListQueryParmaters?.PageSize }
{ "page_size", databasesListQueryParmaters?.PageSize?.ToString() }
};

return await _client.GetAsync<PaginatedList<Database>>(DatabasesApiUrls.List(), queryParams);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
public class DatabasesListParameters : IDatabasesListQueryParmaters
{
public string StartCursor { get; set; }
public string PageSize { get; set; }
public int? PageSize { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public class DatabasesQueryParameters : IDatabaseQueryBodyParameters
public Filter Filter { get; set; }
public List<Sort> Sorts { get; set; }
public string StartCursor { get; set; }
public string PageSize { get; set; }
public int? PageSize { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public class SearchParameters : ISearchBodyParameters
public SearchSort Sort { get; set; }
public SearchFilter Filter { get; set; }
public string StartCursor { get; set; }
public string PageSize { get; set; }
public int? PageSize { get; set; }
}
}
2 changes: 1 addition & 1 deletion Src/Notion.Client/Models/PaginatedList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface IPaginationParameters
string StartCursor { get; set; }

[JsonProperty("page_size")]
string PageSize { get; set; }
int? PageSize { get; set; }
}

public class PaginatedList<T>
Expand Down

0 comments on commit 7e86091

Please sign in to comment.