Module: TencentCosSdk

Defined in:
lib/tencent_cos_sdk.rb,
lib/tencent_cos_sdk/utils.rb,
lib/tencent_cos_sdk/request.rb,
lib/tencent_cos_sdk/version.rb,
lib/tencent_cos_sdk/configuration.rb

Defined Under Namespace

Classes: Configuration, Request

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.confObject



13
14
15
# File 'lib/tencent_cos_sdk/configuration.rb', line 13

def conf
    @conf
end

.configure {|@conf| ... } ⇒ Object

Yields:



7
8
9
10
11
# File 'lib/tencent_cos_sdk/configuration.rb', line 7

def configure
    @conf ||= Configuration.new
    yield @conf
    @conf
end

.delete(path, options = {}) ⇒ Object

TencentCosSdk.delete ‘1/abc.txt’



25
26
27
# File 'lib/tencent_cos_sdk.rb', line 25

def delete path, options = {}
    Request.new(options.merge http_method: 'delete', uri: uri(path), sign: true).execute
end

.get(path, options = {}) ⇒ Object

TencentCosSdk.get ‘1/abc.txt’



18
19
20
# File 'lib/tencent_cos_sdk.rb', line 18

def get path, options = {}
    Request.new(options.merge http_method: 'get', uri: uri(path)).execute
end

.put(path, options = {}) ⇒ Object

TencentCosSdk.put ‘1/abc.txt’, body: ‘abc123’ TencentCosSdk.put ‘1/abc.txt’, file: ‘./xyz.txt’



11
12
13
# File 'lib/tencent_cos_sdk.rb', line 11

def put path, options = {}
    Request.new(options.merge http_method: 'put', uri: uri(path), sign: true).execute
end