Synctera.DocumentsAlpha (Synctera v1.0.0)

Copy Markdown View Source

Synctera 'Documents (alpha)' endpoints.

Code generated by scripts/generate.py from the Synctera OpenAPI spec. Do not edit by hand — re-run mix generate (or python3 scripts/generate.py) to regenerate.

Summary

Functions

Create a document — Docs

Like create_document/2 but returns the value directly and raises on error.

Get a document — Returns the bytes of the requested document.

Like get_document/3 but returns the value directly and raises on error.

Get a document — Returns the bytes of the requested document.

Like get_document_contents/3 but returns the value directly and raises on error.

List documents — Returns a paginated list of documents.

Like list_documents/2 but returns the value directly and raises on error.

Update a document — Update document attributes by document ID

Like update_document/3 but returns the value directly and raises on error.

Functions

create_document(client, opts \\ [])

@spec create_document(
  Synctera.Client.t(),
  keyword()
) :: {:ok, Synctera.JSON.json()} | {:error, Synctera.Error.t()}

Create a document — Docs

Options

  • :body — request body (map), required.
  • :idempotency_key — see Synctera.Idempotency.
  • :device_info — a %Synctera.DeviceInfo{} overriding the client default.

create_document!(client, opts)

@spec create_document!(
  Synctera.Client.t(),
  keyword()
) :: Synctera.JSON.json()

Like create_document/2 but returns the value directly and raises on error.

get_document(client, document_id, opts \\ [])

@spec get_document(Synctera.Client.t(), String.t(), keyword()) ::
  {:ok, Synctera.JSON.json()} | {:error, Synctera.Error.t()}

Get a document — Returns the bytes of the requested document.

Options

  • :device_info — a %Synctera.DeviceInfo{} overriding the client default.

get_document!(client, document_id, opts)

@spec get_document!(Synctera.Client.t(), String.t(), keyword()) ::
  Synctera.JSON.json()

Like get_document/3 but returns the value directly and raises on error.

get_document_contents(client, document_id, opts \\ [])

@spec get_document_contents(Synctera.Client.t(), String.t(), keyword()) ::
  {:ok, Synctera.JSON.json()} | {:error, Synctera.Error.t()}

Get a document — Returns the bytes of the requested document.

Options

  • :device_info — a %Synctera.DeviceInfo{} overriding the client default.

get_document_contents!(client, document_id, opts)

@spec get_document_contents!(Synctera.Client.t(), String.t(), keyword()) ::
  Synctera.JSON.json()

Like get_document_contents/3 but returns the value directly and raises on error.

list_documents(client, opts \\ [])

@spec list_documents(
  Synctera.Client.t(),
  keyword()
) :: {:ok, Synctera.JSON.json()} | {:error, Synctera.Error.t()}

List documents — Returns a paginated list of documents.

Options

Query options: :id, :limit, :page_token

  • :device_info — a %Synctera.DeviceInfo{} overriding the client default.

list_documents!(client, opts)

@spec list_documents!(
  Synctera.Client.t(),
  keyword()
) :: Synctera.JSON.json()

Like list_documents/2 but returns the value directly and raises on error.

update_document(client, document_id, opts \\ [])

@spec update_document(Synctera.Client.t(), String.t(), keyword()) ::
  {:ok, Synctera.JSON.json()} | {:error, Synctera.Error.t()}

Update a document — Update document attributes by document ID

Options

  • :body — request body (map), required.
  • :idempotency_key — see Synctera.Idempotency.
  • :device_info — a %Synctera.DeviceInfo{} overriding the client default.

update_document!(client, document_id, opts)

@spec update_document!(Synctera.Client.t(), String.t(), keyword()) ::
  Synctera.JSON.json()

Like update_document/3 but returns the value directly and raises on error.