Gleanex.Client.Collections (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to collections

Summary

Functions

addcollectionitems(body, opts \\ [])

@spec addcollectionitems(
  body :: Gleanex.Client.AddCollectionItemsRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.AddCollectionItemsResponse.t()}
  | {:error, Gleanex.Error.t()}

Add Collection item

Add items to a Collection.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Data describing the add operation.

createcollection(body, opts \\ [])

@spec createcollection(
  body :: Gleanex.Client.CreateCollectionRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.CreateCollectionResponse.t()}
  | {:error, Gleanex.Error.t()}

Create Collection

Create a publicly visible (empty) Collection of documents.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Collection content plus any additional metadata for the request.

deletecollection(body, opts \\ [])

@spec deletecollection(
  body :: Gleanex.Client.DeleteCollectionRequest.t(),
  opts :: keyword()
) ::
  :ok | {:error, Gleanex.Error.t()}

Delete Collection

Delete a Collection given the Collection's ID.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

DeleteCollection request

deletecollectionitem(body, opts \\ [])

@spec deletecollectionitem(
  body :: Gleanex.Client.DeleteCollectionItemRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.DeleteCollectionItemResponse.t()}
  | {:error, Gleanex.Error.t()}

Delete Collection item

Delete a single item from a Collection.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Data describing the delete operation.

editcollection(body, opts \\ [])

@spec editcollection(
  body :: Gleanex.Client.EditCollectionRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.EditCollectionResponse.t()} | {:error, Gleanex.Error.t()}

Update Collection

Update the properties of an existing Collection.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Collection content plus any additional metadata for the request.

editcollectionitem(body, opts \\ [])

@spec editcollectionitem(
  body :: Gleanex.Client.EditCollectionItemRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.EditCollectionItemResponse.t()}
  | {:error, Gleanex.Error.t()}

Update Collection item

Update the URL, Glean Document ID, description of an item within a Collection given its ID.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

Edit Collection Items request

getcollection(body, opts \\ [])

@spec getcollection(
  body :: Gleanex.Client.GetCollectionRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.GetCollectionResponse.t()} | {:error, Gleanex.Error.t()}

Read Collection

Read the details of a Collection given its ID. Does not fetch items in this Collection.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

GetCollection request

listcollections(body, opts \\ [])

@spec listcollections(
  body :: Gleanex.Client.ListCollectionsRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.ListCollectionsResponse.t()}
  | {:error, Gleanex.Error.t()}

List Collections

List all existing Collections.

Options

  • locale: The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

Request Body

Content Types: application/json

ListCollections request