Skip to main content

Class: CollectionsApi

CollectionsApi - object-oriented interface

Export

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new CollectionsApi(configuration?, basePath?, fetch?)

Parameters

NameTypeDefault value
configuration?Configurationundefined
basePathstringBASE_PATH
fetchFetchAPIportableFetch

Inherited from

BaseAPI.constructor

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:60

Properties

basePath

Protected basePath: string = BASE_PATH

Inherited from

BaseAPI.basePath

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:60


configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:58


fetch

Protected fetch: FetchAPI = portableFetch

Inherited from

BaseAPI.fetch

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:60

Methods

collectionsColuuidCommitPost

collectionsColuuidCommitPost(coluuid, options?): Promise<string>

This endpoint is used to save the contents in a collection, producing a top-level CID that references all the current CIDs in the collection.

Summary

Produce a CID of the collection contents

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
coluuidstringcoluuid
options?anyOverride http request option.

Returns

Promise<string>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1912


collectionsColuuidContentsDelete

collectionsColuuidContentsDelete(coluuid, contentid, body, options?): Promise<string>

This endpoint is used to delete an existing content from an existing collection. If two or more files with the same contentid exist in the collection, delete the one in the specified path

Summary

Deletes a content from a collection

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
coluuidstringCollection ID
contentidstringContent ID
bodyMainDeleteContentFromCollectionBodyVariable to use when filtering for files (must be either 'path' or 'content_id')
options?anyOverride http request option.

Returns

Promise<string>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1926


collectionsColuuidDelete

collectionsColuuidDelete(coluuid, options?): Promise<Response>

This endpoint is used to delete an existing collection.

Summary

Deletes a collection

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
coluuidstringCollection ID
options?anyOverride http request option.

Returns

Promise<Response>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1938


collectionsColuuidGet

collectionsColuuidGet(coluuid, dir?, options?): Promise<string>

This endpoint is used to get contents in a collection. If no colpath query param is passed

Summary

Get contents in a collection

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
coluuidstringcoluuid
dir?stringDirectory
options?anyOverride http request option.

Returns

Promise<string>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1951


collectionsColuuidPost

collectionsColuuidPost(coluuid, contentIDs, options?): Promise<{ [key: string]: string; }>

This endpoint adds already-pinned contents (that have ContentIDs) to a collection.

Summary

Add contents to a collection

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
coluuidstringcoluuid
contentIDsnumber[]Content IDs to add to collection
options?anyOverride http request option.

Returns

Promise<{ [key: string]: string; }>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1964


collectionsFsAddPost

collectionsFsAddPost(coluuid, content, path, options?): Promise<Response>

This endpoint adds a file to a collection

Summary

Add a file to a collection

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
coluuidstringCollection ID
contentstringContent
pathstringPath to file
options?anyOverride http request option.

Returns

Promise<Response>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1978


collectionsGet

collectionsGet(options?): Promise<CollectionsCollection[]>

This endpoint is used to list all collections. Whenever a user logs on estuary, it will list all collections that the user has access to. This endpoint provides a way to list all collections to the user.

Summary

List all collections

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
options?anyOverride http request option.

Returns

Promise<CollectionsCollection[]>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:1989


collectionsPost

collectionsPost(body, options?): Promise<CollectionsCollection>

This endpoint is used to create a new collection. A collection is a representaion of a group of objects added on the estuary. This endpoint can be used to create a new collection.

Summary

Create a new collection

Throws

Memberof

CollectionsApi

Parameters

NameTypeDescription
bodyMainCreateCollectionBodyCollection name and description
options?anyOverride http request option.

Returns

Promise<CollectionsCollection>

Defined in

dev/estuary/estuary-clients/typescript-fetch/api.ts:2001