oauth_china 0.0.5 → 0.0.6

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.
@@ -0,0 +1,34 @@
1
+ module OauthChina
2
+ class Netease < OauthChina::OAuth
3
+
4
+ def initialize(*args)
5
+ #fuck 163
6
+ #authenticate
7
+ self.consumer_options = {
8
+ :site => 'http://api.t.163.com',
9
+ :request_token_path => '/oauth/request_token',
10
+ :access_token_path => '/oauth/access_token',
11
+ :authorize_path => '/oauth/authenticate',
12
+ :realm => url
13
+ }
14
+ super(*args)
15
+ end
16
+
17
+ def name
18
+ :netease
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.163.com/statuses/update.json", options)
32
+ end
33
+ end
34
+ end
@@ -1,3 +1,3 @@
1
1
  module OauthChina
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/oauth_china.rb CHANGED
@@ -76,4 +76,5 @@ module OauthChina
76
76
  autoload :Douban, 'oauth_china/strategies/douban'
77
77
  autoload :Qq, 'oauth_china/strategies/qq'
78
78
  autoload :Sohu, 'oauth_china/strategies/sohu'
79
+ autoload :Netease, 'oauth_china/strategies/netease'
79
80
  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: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hooopo
@@ -51,6 +51,7 @@ files:
51
51
  - Rakefile
52
52
  - lib/oauth_china.rb
53
53
  - lib/oauth_china/strategies/douban.rb
54
+ - lib/oauth_china/strategies/netease.rb
54
55
  - lib/oauth_china/strategies/qq.rb
55
56
  - lib/oauth_china/strategies/sina.rb
56
57
  - lib/oauth_china/strategies/sohu.rb