oauth_china 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,34 @@
1
+ module OauthChina
2
+ class Sohu < OauthChina::OAuth
3
+
4
+ def initialize(*args)
5
+ #fuck sohu...!!
6
+ #搜狐微博的OAUTH 只支持将OAuth的认证参数放在HTTP的头部中。而且不可以带realm参数
7
+ self.consumer_options = {
8
+ :site => 'http://api.t.sohu.com',
9
+ :scheme => :header,
10
+ :request_token_path => '/oauth/request_token',
11
+ :access_token_path => '/oauth/access_token',
12
+ :authorize_path => '/oauth/authorize'
13
+ }
14
+ super(*args)
15
+ end
16
+
17
+ def name
18
+ :sohu
19
+ end
20
+
21
+ def authorized?
22
+ #TODO
23
+ end
24
+
25
+ def destroy
26
+ #TODO
27
+ end
28
+
29
+ def add_status(content, options = {})
30
+ options.merge!(:status => content)
31
+ self.post("http://api.t.sohu.com/statuses/update.json", options)
32
+ end
33
+ end
34
+ end
@@ -1,3 +1,3 @@
1
1
  module OauthChina
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/oauth_china.rb CHANGED
@@ -75,4 +75,5 @@ module OauthChina
75
75
  autoload :Sina, 'oauth_china/strategies/sina'
76
76
  autoload :Douban, 'oauth_china/strategies/douban'
77
77
  autoload :Qq, 'oauth_china/strategies/qq'
78
+ autoload :Sohu, 'oauth_china/strategies/sohu'
78
79
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth_china
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hooopo
@@ -53,6 +53,7 @@ files:
53
53
  - lib/oauth_china/strategies/douban.rb
54
54
  - lib/oauth_china/strategies/qq.rb
55
55
  - lib/oauth_china/strategies/sina.rb
56
+ - lib/oauth_china/strategies/sohu.rb
56
57
  - lib/oauth_china/version.rb
57
58
  - oauth_china.gemspec
58
59
  has_rdoc: true