Gleanex.Client.Pins (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to pins

Summary

Functions

editpin(body, opts \\ [])

@spec editpin(body :: Gleanex.Client.EditPinRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Client.PinDocument.t()} | {:error, Gleanex.Error.t()}

Update pin

Update an existing user-generated pin.

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 pins request

getpin(body, opts \\ [])

@spec getpin(body :: Gleanex.Client.GetPinRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Client.GetPinResponse.t()} | {:error, Gleanex.Error.t()}

Read pin

Read pin details 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

Get pin request

listpins(body, opts \\ [])

@spec listpins(body :: map(), opts :: keyword()) ::
  {:ok, Gleanex.Client.ListPinsResponse.t()} | {:error, Gleanex.Error.t()}

List pins

Lists all pins.

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

List pins request

pin(body, opts \\ [])

@spec pin(body :: Gleanex.Client.PinRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Client.PinDocument.t()} | {:error, Gleanex.Error.t()}

Create pin

Pin a document as a result for a given search query.Pin results that are known to be a good match.

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

Details about the document and query for the pin.

unpin(body, opts \\ [])

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

Delete pin

Unpin a previously pinned result.

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

Details about the pin being unpinned.