oauth2_china 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/examples/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
1
  source "http://ruby.taobao.org"
2
2
 
3
- gem 'oauth2_china', path: "/Users/Pan/rails/oauth2_china/"
3
+ gem 'oauth2_china', path: "/Users/mike/dev/workspace/oauth2_china/"
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.00PvDQzBxMwjVD8993bb67cbOr_UYE"
6
- #res = sina.statuses_update("ello wd")
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
- mentions = sina.statuses_mentions
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
- #res = qq.statuses_update "hello world"
24
- #p res
12
+ res = qq.statuses_update "hello world"
13
+ p res
@@ -1,3 +1,3 @@
1
1
  module Oauth2China
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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 = ["cqpx"]
6
- gem.email = ["cqpanxu@gmail.com"]
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.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - cqpx
8
+ - Chagel
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-26 00:00:00.000000000 Z
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: &70141813570320 !ruby/object:Gem::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: *70141813570320
24
+ version_requirements: *70344330196040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hashie
27
- requirement: &70141813569620 !ruby/object:Gem::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: *70141813569620
35
+ version_requirements: *70344330195600
36
36
  description: weibo client for china.
37
37
  email:
38
- - cqpanxu@gmail.com
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.16
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: