opensea-js
Advanced tools
Comparing version 7.0.8 to 7.0.9
@@ -96,7 +96,9 @@ import { BuildOfferResponse, ListNFTsResponse, GetNFTResponse, ListCollectionOffersResponse, GetOrdersResponse, GetBestOfferResponse, GetBestListingResponse, GetOffersResponse, GetListingsResponse, CollectionOffer } from "./types"; | ||
/** | ||
* 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. | ||
*/ | ||
getBestListings(collectionSlug: string): Promise<GetListingsResponse>; | ||
getBestListings(collectionSlug: string, limit?: number, next?: string): Promise<GetListingsResponse>; | ||
/** | ||
@@ -103,0 +105,0 @@ * Generate the data needed to fulfill a listing or an offer onchain. |
@@ -140,8 +140,13 @@ "use strict"; | ||
/** | ||
* 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. | ||
*/ | ||
async getBestListings(collectionSlug) { | ||
const response = await this.get((0, apiPaths_1.getBestListingsAPIPath)(collectionSlug)); | ||
async getBestListings(collectionSlug, limit, next) { | ||
const response = await this.get((0, apiPaths_1.getBestListingsAPIPath)(collectionSlug), { | ||
limit, | ||
next, | ||
}); | ||
return response; | ||
@@ -148,0 +153,0 @@ } |
{ | ||
"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", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -263,4 +263,6 @@ import { ethers } from "ethers"; | ||
/** | ||
* 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. | ||
@@ -270,5 +272,11 @@ */ | ||
collectionSlug: string, | ||
limit?: number, | ||
next?: string, | ||
): Promise<GetListingsResponse> { | ||
const response = await this.get<GetListingsResponse>( | ||
getBestListingsAPIPath(collectionSlug), | ||
{ | ||
limit, | ||
next, | ||
}, | ||
); | ||
@@ -275,0 +283,0 @@ return response; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
473366
11849