class

B2::Client

Inherits Reference < Object

Constructors

new(account_id : String = ENV["B2_ACCOUNT_ID"], application_key : String = ENV["B2_APPLICATION_KEY"])
Source

Instance methods

authorisation
Source
authorisation?
Source
authorise_account
Source
call(method, uri, type : SuccessType.class, headers = HTTP::Headers.new, body : String | Nil = nil, auth = true) forall SuccessType
Source
call?(method, uri, type : SuccessType.class, headers = HTTP::Headers.new, body : String | Nil = nil, auth = true) forall SuccessType
Source
create_bucket(name, type = BucketType::AllPrivate, bucket_info = nil, lifecycle_rules : Array(LifecycleRule) | Nil = nil)
Source
delete_bucket(bucket_id : String)
Source
delete_bucket(bucket : Bucket)
Source
delete_file_version(file_name : String, file_id : String)
Source
delete_file_version(file : File)
Source
download_file_by_name(bucket : String, name : String, &) : FileDownloadMetadata
Source
download_file_by_name(bucket : Bucket, name : String, &)
Source
get_upload_url(bucket_id : String)
Source
get_upload_url(bucket : Bucket)
Source
upload_file(bucket, file_name, size = nil, sha1_hash = nil, content_type = "b2/x-auto", by_parts = nil, &) : File
Source
upload_file(bucket, file_name, data : String | Bytes, sha1_hash = nil, content_type = "b2/x-auto")
Source