Skip to main content
resources/listings.ListingClient The ListingClient is used to manage listings on the Spaceport marketplace. A listing is an offer made by a licensor to license one or more assets under specific terms, such as price, duration, and royalties. This client handles creating and querying these listings.

Table of contents

Methods

constructor

• new ListingClient(client): ListingClient

Parameters

Returns

ListingClient

Methods

getAll

▸ getAll(params?): Promise<CoreListing[]> Gets all listings with optional filtering parameters.

Parameters

Returns

Promise<CoreListing[]> Array of listings or empty array if none found.

getById

▸ getById(id): Promise<CoreListing> Gets a single listing by ID.

Parameters

Returns

Promise<CoreListing> The listing data or throws error if not found.

create

▸ create(params): Promise<{ success: boolean ; message: string ; jobId: string ; listingId: string }> Creates a listing using the server-side API endpoint. This method delegates the listing creation to the backend API which handles the necessary processing and platform interactions via a job queue system.

Parameters

Returns

Promise<{ success: boolean ; message: string ; jobId: string ; listingId: string }> Object containing success status, job ID, and listing ID. Example