> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spaceport.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: ListingsQueryModule

[query/modules/listings](../modules/query_modules_listings).ListingsQueryModule

Module for querying listing data from The Graph

## Table of contents

#### Methods

* [getAll](#getall)
* [getListings](#getlistings)
* [getListingById](#getlistingbyid)
* [getListingsByLicensor](#getlistingsbylicensor)
* [getActiveListings](#getactivelistings)

### constructor

• **new ListingsQueryModule**(`queryClient`): [`ListingsQueryModule`](./query/modules/listings-query-module)

#### Parameters

| Name          | Type                           |
| :------------ | :----------------------------- |
| `queryClient` | [`QueryClient`](./query/query) |

#### Returns

[`ListingsQueryModule`](./query/modules/listings-query-module)

## Methods

### getAll

▸ **getAll**(`first?`, `skip?`): `Promise`\<[`ListingsResponse`](../types/listings-response)>

Get all listings without any filters

#### Parameters

| Name    | Type     | Default value | Description                             |
| :------ | :------- | :------------ | :-------------------------------------- |
| `first` | `number` | `100`         | Number of items to fetch (default: 100) |
| `skip`  | `number` | `0`           | Number of items to skip (default: 0)    |

#### Returns

`Promise`\<[`ListingsResponse`](../types/listings-response)>

Response with listings and pagination info

### getListings

▸ **getListings**(`params?`, `filters?`): `Promise`\<[`ListingsResponse`](../types/listings-response)>

Get a list of listings based on filtering and pagination parameters

#### Parameters

| Name      | Type                                             | Description           |
| :-------- | :----------------------------------------------- | :-------------------- |
| `params`  | [`PaginationParams`](../types/pagination-params) | Pagination parameters |
| `filters` | [`ListingFilters`](../types/listing-filters)     | Filtering options     |

#### Returns

`Promise`\<[`ListingsResponse`](../types/listings-response)>

List of listings with pagination info

### getListingById

▸ **getListingById**(`id`): `Promise`\<`null` | [`ListingObject`](../types/listing-object)>

Get a single listing by its ID

#### Parameters

| Name | Type     | Description                                              |
| :--- | :------- | :------------------------------------------------------- |
| `id` | `string` | The listing ID (can be blockchain ID or graph entity ID) |

#### Returns

`Promise`\<`null` | [`ListingObject`](../types/listing-object)>

The listing or null if not found

### getListingsByLicensor

▸ **getListingsByLicensor**(`licensorAddress`, `params?`): `Promise`\<[`ListingsResponse`](../types/listings-response)>

Get all listings from a specific licensor

#### Parameters

| Name              | Type                                             | Description           |
| :---------------- | :----------------------------------------------- | :-------------------- |
| `licensorAddress` | \`0x\$\{string}\`                                | Licensor's address    |
| `params`          | [`PaginationParams`](../types/pagination-params) | Pagination parameters |

#### Returns

`Promise`\<[`ListingsResponse`](../types/listings-response)>

List of listings with pagination info

### getActiveListings

▸ **getActiveListings**(`params?`): `Promise`\<[`ListingsResponse`](../types/listings-response)>

Get all active listings

#### Parameters

| Name     | Type                                             | Description           |
| :------- | :----------------------------------------------- | :-------------------- |
| `params` | [`PaginationParams`](../types/pagination-params) | Pagination parameters |

#### Returns

`Promise`\<[`ListingsResponse`](../types/listings-response)>

List of active listings with pagination info
