Gleanex.Client.Shortcuts (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to shortcuts

Summary

Functions

createshortcut(body, opts \\ [])

@spec createshortcut(
  body :: Gleanex.Client.CreateShortcutRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.CreateShortcutResponse.t()} | {:error, Gleanex.Error.t()}

Create shortcut

Create a user-generated shortcut that contains an alias and destination URL.

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

CreateShortcut request

deleteshortcut(body, opts \\ [])

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

Delete shortcut

Delete an existing user-generated shortcut.

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

DeleteShortcut request

getshortcut(body, opts \\ [])

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

Read shortcut

Read a particular shortcut's 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

GetShortcut request

listshortcuts(body, opts \\ [])

List shortcuts

List shortcuts editable/owned by the currently authenticated user.

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

Filters, sorters, paging params required for pagination

updateshortcut(body, opts \\ [])

@spec updateshortcut(
  body :: Gleanex.Client.UpdateShortcutRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.UpdateShortcutResponse.t()} | {:error, Gleanex.Error.t()}

Update shortcut

Updates the shortcut with the given 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

Shortcut content. Id need to be specified for the shortcut.