exfile_b2 v0.1.2 ExfileB2.B2Client behaviour
Summary
Types
b2_client :: %ExfileB2.B2Client{account_id: term, api_url: term, authorization_token: term, download_url: term}
file_contents :: iolist
Callbacks
Specs
authenticate(account_id, application_key) ::
{:ok, b2_client} |
{:error, atom}
Specs
delete(b2_client, ExfileB2.B2Bucket.t, Path.t) ::
:ok |
{:error, atom}
Specs
download(b2_client, ExfileB2.B2Bucket.t, Path.t) ::
{:ok, file_contents} |
{:error, atom}
Specs
download_head(b2_client, ExfileB2.B2Bucket.t, Path.t) ::
{:ok, non_neg_integer} |
{:error, atom}
Specs
get_bucket(b2_client, String.t) ::
{:ok, ExfileB2.B2Bucket.t} |
{:error, atom}
Specs
get_upload_url(b2_client, ExfileB2.B2Bucket.t) ::
{:ok, ExfileB2.B2UploadAuthorization.t} |
{:error, atom}
Specs
list_file_versions(b2_client, ExfileB2.B2Bucket.t, file_name) ::
{:ok, [ExfileB2.B2File.t, ...]} |
{:error, atom}
Specs
upload(b2_client, ExfileB2.B2UploadAuthorization.t, file_contents, file_name) ::
{:ok, ExfileB2.B2File.t} |
{:error, atom}
upload(b2_client, ExfileB2.B2Bucket.t, file_contents, file_name) ::
{:ok, ExfileB2.B2File.t} |
{:error, atom}