Inttegro.FileLinks.CreateRequest (inttegro v0.2.0)

Copy Markdown View Source

Parameters for Create Request in the FileLinks API.

Build this struct with new!/1 and pass it to the corresponding function on Inttegro.FileLinks. Required keys are enforced immediately; optional values left as nil are omitted from the request sent to Inttegro.

Creates controlled links for delivering files.

File links can be time-limited, revocable, and protected by a token. Creating and administering links requires a secret key; opening a link uses its public ID and token and intentionally does not send the application's secret key.

Summary

Types

t()

A validated create request request.

Functions

Builds a Inttegro.FileLinks.CreateRequest and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.FileLinks.CreateRequest{
  access: Inttegro.FileLinks.AccessRequest.t() | nil,
  created_by: Inttegro.Files.ActorInput.t() | nil,
  custom_data: %{optional(String.t()) => String.t()} | nil,
  delivery: Inttegro.FileLinks.DeliveryInput.t() | nil,
  expires_at: String.t() | nil,
  file_id: String.t()
}

A validated create request request.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.FileLinks.CreateRequest and raises KeyError when a required field is missing.