moomerman-twitter_oauth 0.1.9.1.1 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,12 @@ module TwitterOAuth
8
8
  return oauth_response.class == Net::HTTPOK
9
9
  end
10
10
 
11
+ # Returns client info
12
+ def info
13
+ oauth_response = access_token.get('/account/verify_credentials.json')
14
+ JSON.parse(oauth_response.body)
15
+ end
16
+
11
17
  # Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.
12
18
  def rate_limit_status
13
19
  oauth_response = access_token.get('/account/rate_limit_status.json')
@@ -5,6 +5,7 @@ require 'twitter_oauth/search'
5
5
  require 'twitter_oauth/notifications'
6
6
  require 'twitter_oauth/blocks'
7
7
  require 'twitter_oauth/friendships'
8
+ require 'twitter_oauth/user'
8
9
 
9
10
  module TwitterOAuth
10
11
  class Client
@@ -2,7 +2,7 @@ module TwitterOAuth
2
2
  class Client
3
3
 
4
4
  def friends
5
- oauth_response = access_token.post("friends/ids.json")
5
+ oauth_response = access_token.post("/friends/ids.json")
6
6
  JSON.parse(oauth_response.body)
7
7
  end
8
8
 
@@ -0,0 +1,17 @@
1
+ module TwitterOAuth
2
+ class Client
3
+
4
+ # Returns the 100 last friends
5
+ def friends(page=1)
6
+ oauth_response = access_token.get("/statuses/friends.json?page=#{page}")
7
+ JSON.parse(oauth_response.body)
8
+ end
9
+
10
+ # Returns the 100 last followers
11
+ def followers(page=1)
12
+ oauth_response = access_token.get("/statuses/followers.json?page=#{page}")
13
+ JSON.parse(oauth_response.body)
14
+ end
15
+
16
+ end
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moomerman-twitter_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.1.1
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor
@@ -52,6 +52,7 @@ files:
52
52
  - lib/twitter_oauth/blocks.rb
53
53
  - lib/twitter_oauth/friendships.rb
54
54
  - lib/twitter_oauth/notifications.rb
55
+ - lib/twitter_oauth/user.rb
55
56
  has_rdoc: false
56
57
  homepage: http://github.com/moomerman/twitter_oauth
57
58
  post_install_message: