Skip to content

Commit

Permalink
Add pagination to getBestListings (#1383)
Browse files Browse the repository at this point in the history
* add pagination to getBestListings

* bump version
  • Loading branch information
ryanio authored Feb 5, 2024
1 parent cf75756 commit cc43e08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensea-js",
"version": "7.0.8",
"version": "7.0.9",
"description": "TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data",
"license": "MIT",
"author": "OpenSea Developers",
Expand Down
10 changes: 9 additions & 1 deletion src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,23 @@ export class OpenSeaAPI {
}

/**
* Gets the best listing for a given collection.
* Gets the best listings for a given collection.
* @param collectionSlug The slug of the collection.
* @param limit The number of listings to return. Must be between 1 and 100. Default: 100
* @param next The cursor for the next page of results. This is returned from a previous request.
* @returns The {@link GetListingsResponse} returned by the API.
*/
public async getBestListings(
collectionSlug: string,
limit?: number,
next?: string,
): Promise<GetListingsResponse> {
const response = await this.get<GetListingsResponse>(
getBestListingsAPIPath(collectionSlug),
{
limit,
next,
},
);
return response;
}
Expand Down

0 comments on commit cc43e08

Please sign in to comment.