Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ export class BinDistClient {
async listApplications(
options: ListApplicationsOptions = {}
): Promise<ApiResponse<ListApplicationsResponse>> {
const queryString = this.buildQueryString(options as Record<string, unknown>);
// The API reads the page-size parameter as `limit`; `pageSize` is ignored.
const { pageSize, ...rest } = options;
const queryString = this.buildQueryString({
...rest,
...(pageSize === undefined ? {} : { limit: pageSize }),
} as Record<string, unknown>);
return this.request<ListApplicationsResponse>(
`/v1/applications${queryString}`
);
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export interface DownloadInfo {
*/
export interface ListApplicationsOptions {
page?: number;
/** Items per page. Sent as the `limit` query parameter; the server caps it at 100. */
pageSize?: number;
search?: string;
tags?: string;
Expand Down
Loading