B2::Client
Inherits Reference < Object
Constructors
new(account_id : String = ENV["B2_ACCOUNT_ID"], application_key : String = ENV["B2_APPLICATION_KEY"])
SourceInstance methods
authorisation
Sourceauthorisation?
Sourceauthorise_account
Sourcecall(method, uri, type : SuccessType.class, headers = HTTP::Headers.new, body : String | Nil = nil, auth = true) forall SuccessType
Sourcecall?(method, uri, type : SuccessType.class, headers = HTTP::Headers.new, body : String | Nil = nil, auth = true) forall SuccessType
Sourcecreate_bucket(name, type = BucketType::AllPrivate, bucket_info = nil, lifecycle_rules : Array(LifecycleRule) | Nil = nil)
Sourcedelete_bucket(bucket_id : String)
Sourcedelete_bucket(bucket : Bucket)
Sourcedelete_file_version(file_name : String, file_id : String)
Sourcedelete_file_version(file : File)
Sourcedownload_file_by_name(bucket : String, name : String, &) : FileDownloadMetadata
Sourcedownload_file_by_name(bucket : Bucket, name : String, &)
Sourceget_upload_url(bucket_id : String)
Sourceget_upload_url(bucket : Bucket)
Sourceupload_file(bucket, file_name, size = nil, sha1_hash = nil, content_type = "b2/x-auto", by_parts = nil, &) : File
Sourceupload_file(bucket, file_name, data : String | Bytes, sha1_hash = nil, content_type = "b2/x-auto")
Source