Files
medusa-store/docs/content/references/js-client/classes/CollectionsResource.md
Shahed Nasser 02d5c1da88 docs: update Typedoc and regenerate references (#1994)
* generated new services reference

* changed from automatic push to automated pull request

* updated typedoc, regenerated JS Client reference

* regenerated the reference after updating typedoc

* added action for js client
2022-08-04 17:29:52 +03:00

58 lines
1.6 KiB
Markdown

# Class: CollectionsResource
## Hierarchy
- `default`
**`CollectionsResource`**
## Methods
### list
**list**(`query?`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCollectionsListRes`](../modules/internal-31.md#storecollectionslistres)\>
**`Description`**
Retrieves a list of collections
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `query?` | [`StoreGetCollectionsParams`](internal-31.StoreGetCollectionsParams.md) | is optional. Can contain a limit and offset for the returned list |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCollectionsListRes`](../modules/internal-31.md#storecollectionslistres)\>
#### Defined in
[medusa-js/src/resources/collections.ts:28](https://github.com/medusajs/medusa/blob/e38dd7f6/packages/medusa-js/src/resources/collections.ts#L28)
___
### retrieve
**retrieve**(`id`, `customHeaders?`): [`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCollectionsRes`](../modules/internal-31.md#storecollectionsres)\>
**`Description`**
Retrieves a single collection
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `id` | `string` | id of the collection |
| `customHeaders` | `Record`<`string`, `any`\> | |
#### Returns
[`ResponsePromise`](../modules/internal.md#responsepromise)<[`StoreCollectionsRes`](../modules/internal-31.md#storecollectionsres)\>
#### Defined in
[medusa-js/src/resources/collections.ts:17](https://github.com/medusajs/medusa/blob/e38dd7f6/packages/medusa-js/src/resources/collections.ts#L17)