oauth2_china 0.0.3 → 0.0.4
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.
- data/examples/Gemfile +1 -1
- data/examples/tester.rb +7 -18
- data/lib/oauth2_china/version.rb +1 -1
- data/lib/oauth2_china.rb +7 -0
- data/oauth2_china.gemspec +2 -2
- metadata +10 -9
data/examples/Gemfile
CHANGED
data/examples/tester.rb
CHANGED
@@ -1,24 +1,13 @@
|
|
1
1
|
#coding: utf-8
|
2
2
|
require 'oauth2_china'
|
3
|
-
require 'pp'
|
4
3
|
|
5
|
-
sina = Oauth2China::Sina.new "2.
|
6
|
-
|
4
|
+
#sina = Oauth2China::Sina.new "2.00PvDQzBee3piCd9690cd4fcq5DwtB"
|
5
|
+
##res = sina.statuses_update("ello wd")
|
6
|
+
##p res
|
7
7
|
#res = sina.statuses_upload("come on gif", "./016.gif")
|
8
|
-
|
9
|
-
mentions.statuses.each do |mention|
|
10
|
-
if mention.geo?
|
11
|
-
coordinates = mention.geo.coordinates
|
12
|
-
pp coordinates
|
13
|
-
pp mention
|
14
|
-
else
|
15
|
-
pp 'no geo'
|
16
|
-
end
|
17
|
-
if mention.original_pic?
|
18
|
-
pp mention.original_pic
|
19
|
-
end
|
20
|
-
end
|
8
|
+
#p res
|
21
9
|
|
10
|
+
qq = Oauth2China::Tencent.new "88f6c1b65ff3dbd0ebdda3db123f791a", "7547D743583717EA820A834BE4B50255"
|
22
11
|
#qq = Oauth2China::Tencent.new "a92e335ad63b4d7dbf9ac9d299fe7817", "565f61c64aa43838af462b355022c562"
|
23
|
-
|
24
|
-
|
12
|
+
res = qq.statuses_update "hello world"
|
13
|
+
p res
|
data/lib/oauth2_china/version.rb
CHANGED
data/lib/oauth2_china.rb
CHANGED
@@ -187,6 +187,13 @@ module Oauth2China
|
|
187
187
|
res = @conn.post("/api/user/info", params.to_hash).body
|
188
188
|
Hashie::Mash.new(JSON.parse res)
|
189
189
|
end
|
190
|
+
|
191
|
+
def friendships_create(name)
|
192
|
+
params = @tmpl.clone
|
193
|
+
params.name = name
|
194
|
+
res = @conn.post("/api/friends/add", params.to_hash).body
|
195
|
+
Hashie::Mash.new(JSON.parse res)
|
196
|
+
end
|
190
197
|
end
|
191
198
|
|
192
199
|
end
|
data/oauth2_china.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
require File.expand_path('../lib/oauth2_china/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.authors = ["
|
6
|
-
gem.email = ["
|
5
|
+
gem.authors = ["Chagel"]
|
6
|
+
gem.email = ["chagel@gmail.com"]
|
7
7
|
gem.description = %q{weibo client for china.}
|
8
8
|
gem.summary = %q{weibo client for china. Currently support sina and qq apis.}
|
9
9
|
gem.homepage = ""
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth2_china
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
-
|
8
|
+
- Chagel
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
|
-
requirement: &
|
16
|
+
requirement: &70344330196040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70344330196040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hashie
|
27
|
-
requirement: &
|
27
|
+
requirement: &70344330195600 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70344330195600
|
36
36
|
description: weibo client for china.
|
37
37
|
email:
|
38
|
-
-
|
38
|
+
- chagel@gmail.com
|
39
39
|
executables: []
|
40
40
|
extensions: []
|
41
41
|
extra_rdoc_files: []
|
@@ -72,8 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
75
|
+
rubygems_version: 1.8.17
|
76
76
|
signing_key:
|
77
77
|
specification_version: 3
|
78
78
|
summary: weibo client for china. Currently support sina and qq apis.
|
79
79
|
test_files: []
|
80
|
+
has_rdoc:
|