qq_17up 4.0.2 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.DS_Store +0 -0
  3. data/lib/qq/client.rb +25 -20
  4. data/lib/qq/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e0df5b86252573c5f99dee1e2f5ad81995e51dc
4
- data.tar.gz: 3850057bf6ff7cc65024f5f8489e2836ce3b0dde
3
+ metadata.gz: b3bfdec18b9a0361000a849f5ba9d80da2b6110a
4
+ data.tar.gz: 04aa5d1bb1bc4eced93ae458b1481e6429bc7ecc
5
5
  SHA512:
6
- metadata.gz: a148633bdf38203db6761aae748c2805c19519ddf69f01302d78ebf61e8c5a6279ac5ced773042ea6a6ba3563c10438fb81fba416303baf136656b7194881bfa
7
- data.tar.gz: 62984c2e1f437f9217f8530267506553bf8eae68bd365dd1fac5959d8c4df12eaaa2105fcd20dbcd33621e891c1e21316326dcbbeddac684bd3e052bae6e8ef5
6
+ metadata.gz: 4cdec5ff3670a3bdf8b05855e2c39c3a9147ec870cf6266f66eadc5a4bcfa0ca2e98b9a5f5401952ee0b4ccb491ab7377bf9eb964f54d96751325ae3a6fb1bef
7
+ data.tar.gz: 9fa5388e4e2878e8be590325b628ada6d4e87b32e70b514b13fc9c3d7fdcf23b09a0c0b2691655d68b6a7b7a36e36cd13d1894b5732688057a926474ea91cef1
data/.DS_Store CHANGED
Binary file
@@ -1,30 +1,35 @@
1
1
  require "rest-client"
2
2
 
3
3
  module Qq
4
- class Client
5
- attr_reader :oauth
4
+ class Client
5
+ attr_reader :oauth
6
6
 
7
- def initialize(access_token, uid)
8
- @oauth = Oauth.new(access_token,uid)
9
- end
7
+ def initialize(access_token, uid)
8
+ @oauth = Oauth.new(access_token,uid)
9
+ end
10
10
 
11
- ################# api
11
+ ################# api
12
12
 
13
- def get_info(options = {})
14
- @oauth.get "user/get_info",options
15
- end
13
+ def get_info(options = {})
14
+ @oauth.get "user/get_info",options
15
+ end
16
16
 
17
- #发表一条微博信息到腾讯微博
18
- def add_t(content,options = {})
19
- default_params = { :content => content }
20
- @oauth.post "t/add_t",default_params.merge(options)
21
- end
17
+ #发表一条微博信息到腾讯微博
18
+ def add_t(content,options = {})
19
+ default_params = { :content => content }
20
+ @oauth.post "t/add_t",default_params.merge(options)
21
+ end
22
22
 
23
- #上传图片并发表消息到腾讯微博
24
- def add_pic_t(content,pic,options = {})
25
- default_params = { :content => content,:pic => pic }
26
- @oauth.post "t/add_pic_t",default_params.merge(options)
27
- end
23
+ #上传图片并发表消息到腾讯微博
24
+ def add_pic_t(content,pic,options = {})
25
+ default_params = { :content => content,:pic => pic }
26
+ @oauth.post "t/add_pic_t",default_params.merge(options)
27
+ end
28
28
 
29
- end
29
+ def add_blog(title,content)
30
+ params = { :content => content,:title => title,:format => 'json' }
31
+ @oauth.post "blog/add_one_blog",params
32
+ end
33
+
34
+ end
30
35
  end
@@ -1,3 +1,3 @@
1
1
  module Qq
2
- VERSION = "4.0.2"
2
+ VERSION = "4.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qq_17up
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - veggie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-08 00:00:00.000000000 Z
11
+ date: 2013-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client