ExPersona.Document (ex_persona v0.0.2) View Source
Module for getting a document's metadata and downloading its contents.
For instance:
doc = ExPersona.Document.get("an-id") |> ExPersona.request!()
if Document.has_file?(doc, "front_image") do
{:ok, body} = Document.download_file(doc, "front_image")
File.write("front_image.png", body)
end
Link to this section Summary
Functions
Create an ExPersona.Client.Operation to then request for a file's contents.
Get a specific ExPersona.Document.
Determind if the ExPersona.Document contains a file with the given name.
Link to this section Types
Specs
Link to this section Functions
Specs
download_file(t(), String.t()) :: ExPersona.Client.Operation.t()
Create an ExPersona.Client.Operation to then request for a file's contents.
Specs
get(String.t()) :: ExPersona.Client.Operation.t()
Get a specific ExPersona.Document.
Specs
Determind if the ExPersona.Document contains a file with the given name.