Gleanex.Client.Documents (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to documents

Summary

Functions

getdocpermissions(body, opts \\ [])

@spec getdocpermissions(
  body :: Gleanex.Client.GetDocPermissionsRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.GetDocPermissionsResponse.t()}
  | {:error, Gleanex.Error.t()}

Read document permissions

Read the emails of all users who have access to the given document.

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

Document permissions request

getdocuments(body, opts \\ [])

@spec getdocuments(body :: Gleanex.Client.GetDocumentsRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Client.GetDocumentsResponse.t()} | {:error, Gleanex.Error.t()}

Read documents

Read the documents including metadata (does not include enhanced metadata via /documentmetadata) for the given list of Glean Document IDs or URLs specified in the request.

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

Information about documents requested.

getdocumentsbyfacets(body, opts \\ [])

@spec getdocumentsbyfacets(
  body :: Gleanex.Client.GetDocumentsByFacetsRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Client.GetDocumentsByFacetsResponse.t()}
  | {:error, Gleanex.Error.t()}

Read documents by facets

Read the documents including metadata (does not include enhanced metadata via /documentmetadata) macthing the given facet conditions.

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

Information about facet conditions for documents to be retrieved.