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.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/lib/qq/client.rb +25 -20
- data/lib/qq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3bfdec18b9a0361000a849f5ba9d80da2b6110a
|
4
|
+
data.tar.gz: 04aa5d1bb1bc4eced93ae458b1481e6429bc7ecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cdec5ff3670a3bdf8b05855e2c39c3a9147ec870cf6266f66eadc5a4bcfa0ca2e98b9a5f5401952ee0b4ccb491ab7377bf9eb964f54d96751325ae3a6fb1bef
|
7
|
+
data.tar.gz: 9fa5388e4e2878e8be590325b628ada6d4e87b32e70b514b13fc9c3d7fdcf23b09a0c0b2691655d68b6a7b7a36e36cd13d1894b5732688057a926474ea91cef1
|
data/.DS_Store
CHANGED
Binary file
|
data/lib/qq/client.rb
CHANGED
@@ -1,30 +1,35 @@
|
|
1
1
|
require "rest-client"
|
2
2
|
|
3
3
|
module Qq
|
4
|
-
|
5
|
-
|
4
|
+
class Client
|
5
|
+
attr_reader :oauth
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
def initialize(access_token, uid)
|
8
|
+
@oauth = Oauth.new(access_token,uid)
|
9
|
+
end
|
10
10
|
|
11
|
-
|
11
|
+
################# api
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
def get_info(options = {})
|
14
|
+
@oauth.get "user/get_info",options
|
15
|
+
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
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
|
data/lib/qq/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|