Class: Qq::Client
- Inherits:
-
Object
- Object
- Qq::Client
- Defined in:
- lib/qq/client.rb
Instance Attribute Summary collapse
-
#oauth ⇒ Object
readonly
Returns the value of attribute oauth.
Instance Method Summary collapse
- #add_blog(title, content) ⇒ Object
-
#add_pic_t(content, pic, options = {}) ⇒ Object
上传图片并发表消息到腾讯微博.
-
#add_t(content, options = {}) ⇒ Object
发表一条微博信息到腾讯微博.
-
#get_info(options = {}) ⇒ Object
api.
-
#initialize(access_token, uid) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Attribute Details
#oauth ⇒ Object (readonly)
Returns the value of attribute oauth.
5 6 7 |
# File 'lib/qq/client.rb', line 5 def oauth @oauth end |
Instance Method Details
#add_blog(title, content) ⇒ Object
29 30 31 32 |
# File 'lib/qq/client.rb', line 29 def add_blog(title,content) params = { :content => content,:title => title,:format => 'json' } @oauth.post "blog/add_one_blog",params end |
#add_pic_t(content, pic, options = {}) ⇒ Object
上传图片并发表消息到腾讯微博
24 25 26 27 |
# File 'lib/qq/client.rb', line 24 def add_pic_t(content,pic, = {}) default_params = { :content => content,:pic => pic } @oauth.post "t/add_pic_t",default_params.merge() end |
#add_t(content, options = {}) ⇒ Object
发表一条微博信息到腾讯微博
18 19 20 21 |
# File 'lib/qq/client.rb', line 18 def add_t(content, = {}) default_params = { :content => content } @oauth.post "t/add_t",default_params.merge() end |
#get_info(options = {}) ⇒ Object
api
13 14 15 |
# File 'lib/qq/client.rb', line 13 def get_info( = {}) @oauth.get "user/get_info", end |