Skip to content

nickcen/qcloudapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qcloudapi

qcloudapi是为了让Ruby开发者能够在自己的代码里更快捷方便的使用腾讯云的API而开发的SDK工具包。

更新历史

  • [08/21/15] 添加云搜模块

资源

入门

  1. 申请安全凭证。 在第一次使用云API之前,用户首先需要在腾讯云网站上申请安全凭证,安全凭证包括 SecretId 和 SecretKey, SecretId 是用于标识 API 调用者的身份,SecretKey是用于加密签名字符串和服务器端验证签名字符串的密钥。SecretKey 必须严格保管,避免泄露。

  2. 下载SDK,放入到您的程序目录。 使用方法请参考下面的例子。

例子

require 'qcloudapi'

Qcloudapi.secret_id = '你的secretId'
Qcloudapi.secret_key = '你的secretKey'


// 请求参数,请参考wiki文档上对应接口的说明
params = [{:name => 'test'}]

service = Qcloudapi::Module::Yunsou.new

// 请求方法为对应接口的接口名,请参考wiki文档上对应接口的接口名
result = service.add_docs(1, params)

if (result == false) 
    // 请求失败,解析错误信息
    error = service->getError();
    puts "Error code: #{error.code} message: #{error.message}"
else
    // 请求成功
    puts result
end

About

qcloudapi是为了让Ruby开发者能够在自己的代码里更快捷方便的使用腾讯云的API而开发的SDK工具包。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors