View Source ExPersona.Document (ex_persona v1.0.2)
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
Link to this section Functions
@spec download_file(t(), String.t()) :: ExPersona.Client.Operation.t()
Create an ExPersona.Client.Operation
to then request for a file's contents.
@spec get(String.t()) :: ExPersona.Client.Operation.t()
Get a specific ExPersona.Document
.
Determind if the ExPersona.Document
contains a file with the given name.