module TencentCosSdk
Constants
- VERSION
Public Class Methods
conf()
click to toggle source
# File lib/tencent_cos_sdk/configuration.rb, line 13 def conf @conf end
configure() { |conf| ... }
click to toggle source
# File lib/tencent_cos_sdk/configuration.rb, line 7 def configure @conf ||= Configuration.new yield @conf @conf end
delete(path, options = {})
click to toggle source
TencentCosSdk.delete
'1/abc.txt'
# File lib/tencent_cos_sdk.rb, line 25 def delete path, options = {} Request.new(options.merge http_method: 'delete', path: path, sign: true).execute end
get(path, options = {})
click to toggle source
TencentCosSdk.get
'1/abc.txt'
# File lib/tencent_cos_sdk.rb, line 18 def get path, options = {} Request.new(options.merge http_method: 'get', path: path).execute end
put(path, options = {})
click to toggle source
TencentCosSdk.put
'1/abc.txt', body: 'abc123' TencentCosSdk.put
'1/abc.txt', file: './xyz.txt'
# File lib/tencent_cos_sdk.rb, line 11 def put path, options = {} Request.new(options.merge http_method: 'put', path: path, sign: true).execute end
uri(path)
click to toggle source
# File lib/tencent_cos_sdk/utils.rb, line 6 def uri(path) "#{TencentCosSdk.conf.parent_path.to_s}/#{path}" end
url(path)
click to toggle source
# File lib/tencent_cos_sdk/utils.rb, line 10 def url(path) "https://#{TencentCosSdk.conf.host}#{uri path}" end