Skip to content

Client

Classes

ServerInfo_1
Client

ServerInfo_1

Kind: global class

new ServerInfo_1()

Represents HTTP Client for Reduct Storage API

Client

Kind: global class

new Client(url, options)

HTTP Client for Reduct Storage

Param Description
url URL to the storage
options

client.getInfo() ⇒ Promise.<ServerInfo>

Get server information

Kind: instance method of Client
Returns: Promise.<ServerInfo> - the data about the server

client.getBucketList() ⇒ Array.<BucketInfo>

Get list of buckets

Kind: instance method of Client
See: BucketInfo

client.createBucket(name, settings) ⇒ Promise.<Bucket>

Create a new bucket

Kind: instance method of Client

Param Description
name name of the bucket
settings optional settings

client.getBucket(name) ⇒ Promise.<Bucket>

Get a bucket by name

Kind: instance method of Client

Param Description
name name of the bucket

client.getOrCreateBucket(name, settings) ⇒ Promise.<Bucket>

Try to create a bucket and get it if it already exists

Kind: instance method of Client

Param Description
name name of the bucket
settings optional settings