twitter_oauth 0.4.4 → 0.4.9
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.
- checksums.yaml +7 -0
- data/README.textile +39 -7
- data/lib/twitter_oauth.rb +1 -1
- data/lib/twitter_oauth/account.rb +2 -11
- data/lib/twitter_oauth/client.rb +32 -22
- data/lib/twitter_oauth/friendships.rb +42 -8
- data/lib/twitter_oauth/help.rb +14 -0
- data/lib/twitter_oauth/search.rb +4 -25
- data/lib/twitter_oauth/trends.rb +23 -17
- data/lib/twitter_oauth/user.rb +10 -51
- metadata +17 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 639d2e417aaee45051563ee329334f846269208a
|
4
|
+
data.tar.gz: fbacee9a0cca0bc7ee3548a6597442d6dac3abe8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6e37581314f14bb089f61d7b20415bbe39803c54d312132ab9e23d1fb4455351b12ddfbc2c5cf54a1bc7c18328e838c81acc9df003cc1921055c703bc867c743
|
7
|
+
data.tar.gz: 34eeb8f1a635194f04b3a716cd57c5d2d46740e1acc9953c6b1a207c1978d0e0e2129ae0827602d7cbe0ba80c2fb07a83d718dadbe9c8f94fa56226f848ba970
|
data/README.textile
CHANGED
@@ -14,9 +14,9 @@ h2. Unauthorized request example
|
|
14
14
|
|
15
15
|
The Twitter API can be called to make public requests without needing any client credentials.
|
16
16
|
Most methods will not work in this mode but some of them do. An example to retrieve the public details
|
17
|
-
about a Twitter user is below.
|
17
|
+
about a Twitter user is below.
|
18
18
|
|
19
|
-
<pre><code>client = TwitterOAuth::Client.new
|
19
|
+
<pre><code>client = TwitterOAuth::Client.new
|
20
20
|
|
21
21
|
puts client.show('twitter')
|
22
22
|
=> => {"status"=>{"truncated"=>false, "favorited"=>false, "text"=>"Update on service issues http://tinyurl.com/ca872j", "id"=>1357776683, "in_reply_to_user_id"=>nil, "in_reply_to_status_id"=>nil, "source"=>"<a href=\"http://twitterfeed.com\">twitterfeed</a>", "created_at"=>"Fri Mar 20 01:17:35 +0000 2009"}, "name"=>"Twitter", "profile_sidebar_fill_color"=>"CDFFFF", "profile_sidebar_border_color"=>"8a6447", "profile_background_tile"=>false, "profile_link_color"=>"0000ff", "url"=>"http://twitter.com", "favourites_count"=>0, "id"=>783214, "description"=>"Always wondering what everyone's doing.", "profile_text_color"=>"000000", "protected"=>false, "utc_offset"=>-28800, "screen_name"=>"twitter", "profile_background_color"=>"9ae4e8", "time_zone"=>"Pacific Time (US & Canada)", "followers_count"=>469150, "profile_background_image_url"=>"http://static.twitter.com/images/themes/theme1/bg.gif", "friends_count"=>30, "statuses_count"=>290, "location"=>"San Francisco, CA", "profile_image_url"=>"http://s3.amazonaws.com/twitter_production/profile_images/75075164/twitter_bird_profile_normal.png", "created_at"=>"Tue Feb 20 14:35:54 +0000 2007"}
|
@@ -41,10 +41,10 @@ when you set up your application.
|
|
41
41
|
|
42
42
|
<pre><code>client = TwitterOAuth::Client.new(
|
43
43
|
:consumer_key => 'YOUR_APP_CONSUMER_KEY',
|
44
|
-
:consumer_secret => '
|
44
|
+
:consumer_secret => 'YOUR_APP_CONSUMER_SECRET'
|
45
45
|
)
|
46
46
|
request_token = client.request_token(:oauth_callback => oauth_confirm_url)
|
47
|
-
#:oauth_callback required for web apps, since oauth gem by default force PIN-based flow
|
47
|
+
#:oauth_callback required for web apps, since oauth gem by default force PIN-based flow
|
48
48
|
#( see http://groups.google.com/group/twitter-development-talk/browse_thread/thread/472500cfe9e7cdb9/848f834227d3e64d )
|
49
49
|
|
50
50
|
|
@@ -55,6 +55,8 @@ request_token.authorize_url
|
|
55
55
|
In your application your user would be redirected to Twitter to authorize the application at this point. You'll need to store
|
56
56
|
the request token (usually in the session) for later. The code continues below assuming the user has authorized your application.
|
57
57
|
|
58
|
+
NOTE: Above we called the <code>client.request_token(...)</code> method, this authorizes the application on every call. You can also use the <code>client.authentication_request_token(...)</code> method which automatically redirects back to your application if the user has previously authorized the app.
|
59
|
+
|
58
60
|
<pre><code>access_token = client.authorize(
|
59
61
|
request_token.token,
|
60
62
|
request_token.secret,
|
@@ -72,8 +74,8 @@ Now if you keep hold of the access_token (usually in the database) for this user
|
|
72
74
|
<pre><code>access_token = @user.access_token # assuming @user
|
73
75
|
client = TwitterOAuth::Client.new(
|
74
76
|
:consumer_key => 'YOUR_CONSUMER_KEY',
|
75
|
-
:consumer_secret => '
|
76
|
-
:token => access_token.token,
|
77
|
+
:consumer_secret => 'YOUR_APP_CONSUMER_SECRET',
|
78
|
+
:token => access_token.token,
|
77
79
|
:secret => access_token.secret
|
78
80
|
)
|
79
81
|
|
@@ -81,6 +83,36 @@ client.authorized?
|
|
81
83
|
=> true
|
82
84
|
</code></pre>
|
83
85
|
|
86
|
+
h2. PIN-based flow
|
87
|
+
|
88
|
+
If you're writing a command line application or desktop app, you will probably want to use the PIN-based authorization method rather than the website redirect method.
|
89
|
+
|
90
|
+
<pre><code>client = TwitterOAuth::Client.new(
|
91
|
+
:consumer_key => 'YOUR_CONSUMER_KEY',
|
92
|
+
:consumer_secret => 'YOUR_APP_CONSUMER_SECRET'
|
93
|
+
)
|
94
|
+
|
95
|
+
request_token = client.authentication_request_token(
|
96
|
+
:oauth_callback => 'oob'
|
97
|
+
)
|
98
|
+
|
99
|
+
puts request_token.authorize_url
|
100
|
+
|
101
|
+
print 'Please visit the URL and enter the code: '
|
102
|
+
code = gets.strip
|
103
|
+
|
104
|
+
access_token = client.authorize(
|
105
|
+
request_token.token,
|
106
|
+
request_token.secret,
|
107
|
+
:oauth_verifier => code
|
108
|
+
)
|
109
|
+
|
110
|
+
client.authorized?
|
111
|
+
=> true
|
112
|
+
</code></pre>
|
113
|
+
|
114
|
+
The special oauth callback value of <code>oob</code> tells Twitter you want to do the PIN-based authentication. The user goes to the authorization URL to get their unique code and they paste that into your application. Finally we authorize the user with this code.
|
115
|
+
|
84
116
|
h2. Working with a Proxy
|
85
117
|
|
86
118
|
Services such as "Apigee Analytics and API Management":http://apigee.com/ require you to proxy your API requests through their servers. The workflow is as follows.
|
@@ -116,7 +148,7 @@ client = TwitterOAuth::Client.new(
|
|
116
148
|
:proxy => 'http://XXX.YYY.apigee.com',
|
117
149
|
:consumer_key => 'YOUR_CONSUMER_KEY',
|
118
150
|
:consumer_secret => 'YOUR-CONSUMER-SECRET',
|
119
|
-
:token => access_token.token,
|
151
|
+
:token => access_token.token,
|
120
152
|
:secret => access_token.secret
|
121
153
|
)
|
122
154
|
|
data/lib/twitter_oauth.rb
CHANGED
@@ -4,20 +4,11 @@ module TwitterOAuth
|
|
4
4
|
# Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful;
|
5
5
|
# returns a 401 status code and an error message if not.
|
6
6
|
def authorized?
|
7
|
-
|
7
|
+
puts "[Client] GET /account/verify_credentials.json" if @debug
|
8
|
+
oauth_response = access_token.get("/#{@api_version}/account/verify_credentials.json")
|
8
9
|
return oauth_response.class == Net::HTTPOK
|
9
10
|
end
|
10
11
|
|
11
|
-
# Returns client info
|
12
|
-
def info
|
13
|
-
get('/account/verify_credentials.json')
|
14
|
-
end
|
15
|
-
|
16
|
-
# Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour.
|
17
|
-
def rate_limit_status
|
18
|
-
get('/account/rate_limit_status.json')
|
19
|
-
end
|
20
|
-
|
21
12
|
# Updates profile background image. Takes a File object and optional tile argument.
|
22
13
|
# Returns extended user info object.
|
23
14
|
def update_profile_background_image(image, tile = false)
|
data/lib/twitter_oauth/client.rb
CHANGED
@@ -14,18 +14,22 @@ require 'twitter_oauth/lists'
|
|
14
14
|
require 'twitter_oauth/saved_searches'
|
15
15
|
require 'twitter_oauth/spam'
|
16
16
|
require 'twitter_oauth/geo'
|
17
|
+
require 'twitter_oauth/help'
|
17
18
|
|
18
19
|
module TwitterOAuth
|
19
20
|
class Client
|
20
|
-
|
21
|
+
|
21
22
|
def initialize(options = {})
|
22
23
|
@consumer_key = options[:consumer_key]
|
23
24
|
@consumer_secret = options[:consumer_secret]
|
24
25
|
@token = options[:token]
|
25
26
|
@secret = options[:secret]
|
26
27
|
@proxy = options[:proxy]
|
28
|
+
@debug = options[:debug]
|
29
|
+
@api_version = options[:api_version] || '1.1'
|
30
|
+
@api_host = options[:api_host] || 'api.twitter.com'
|
27
31
|
end
|
28
|
-
|
32
|
+
|
29
33
|
def authorize(token, secret, options = {})
|
30
34
|
request_token = OAuth::RequestToken.new(
|
31
35
|
consumer, token, secret
|
@@ -35,56 +39,62 @@ module TwitterOAuth
|
|
35
39
|
@secret = @access_token.secret
|
36
40
|
@access_token
|
37
41
|
end
|
38
|
-
|
42
|
+
|
39
43
|
def show(username)
|
40
44
|
get("/users/show/#{username}.json")
|
41
45
|
end
|
42
|
-
|
43
|
-
# Returns the string "ok" in the requested format with a 200 OK HTTP status code.
|
44
|
-
def test
|
45
|
-
get("/help/test.json")
|
46
|
-
end
|
47
|
-
|
46
|
+
|
48
47
|
def request_token(options={})
|
49
48
|
consumer.get_request_token(options)
|
50
49
|
end
|
51
|
-
|
50
|
+
|
52
51
|
def authentication_request_token(options={})
|
53
52
|
consumer.options[:authorize_path] = '/oauth/authenticate'
|
54
53
|
request_token(options)
|
55
54
|
end
|
56
|
-
|
55
|
+
|
57
56
|
private
|
58
|
-
|
59
|
-
def consumer
|
57
|
+
|
58
|
+
def consumer(options={})
|
60
59
|
@consumer ||= OAuth::Consumer.new(
|
61
60
|
@consumer_key,
|
62
61
|
@consumer_secret,
|
63
|
-
{ :site =>
|
62
|
+
{ :site => "https://#{@api_host}", :request_endpoint => @proxy }
|
64
63
|
)
|
65
64
|
end
|
66
65
|
|
67
66
|
def access_token
|
68
67
|
@access_token ||= OAuth::AccessToken.new(consumer, @token, @secret)
|
69
68
|
end
|
70
|
-
|
69
|
+
|
71
70
|
def get(path, headers={})
|
71
|
+
puts "[Client] GET #{path}" if @debug
|
72
72
|
headers.merge!("User-Agent" => "twitter_oauth gem v#{TwitterOAuth::VERSION}")
|
73
|
-
oauth_response = access_token.get("
|
74
|
-
|
73
|
+
oauth_response = access_token.get("/#{@api_version}#{path}", headers)
|
74
|
+
parse(oauth_response.body)
|
75
75
|
end
|
76
76
|
|
77
77
|
def post(path, body='', headers={})
|
78
|
+
puts "[Client] POST #{path}" if @debug
|
78
79
|
headers.merge!("User-Agent" => "twitter_oauth gem v#{TwitterOAuth::VERSION}")
|
79
|
-
oauth_response = access_token.post("
|
80
|
-
|
80
|
+
oauth_response = access_token.post("/#{@api_version}#{path}", body, headers)
|
81
|
+
parse(oauth_response.body)
|
81
82
|
end
|
82
83
|
|
83
84
|
def delete(path, headers={})
|
85
|
+
puts "[Client] DELETE #{path}" if @debug
|
84
86
|
headers.merge!("User-Agent" => "twitter_oauth gem v#{TwitterOAuth::VERSION}")
|
85
|
-
oauth_response = access_token.delete("
|
86
|
-
|
87
|
+
oauth_response = access_token.delete("/#{@api_version}#{path}", headers)
|
88
|
+
parse(oauth_response.body)
|
89
|
+
end
|
90
|
+
|
91
|
+
def parse(response_body)
|
92
|
+
begin
|
93
|
+
JSON.parse(response_body)
|
94
|
+
rescue JSON::ParserError
|
95
|
+
{:response => response_body}.to_json
|
96
|
+
end
|
87
97
|
end
|
88
98
|
end
|
89
99
|
end
|
90
|
-
|
100
|
+
|
@@ -1,39 +1,73 @@
|
|
1
1
|
module TwitterOAuth
|
2
2
|
class Client
|
3
|
-
|
3
|
+
|
4
4
|
# Returns an array of numeric IDs for every user the specified user is following.
|
5
5
|
def friends_ids(options={})
|
6
6
|
args = options.map{|k,v| "#{k}=#{v}"}.join('&')
|
7
7
|
get("/friends/ids.json?#{args}")
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
# Returns an array of numeric IDs for every user following the specified user.
|
11
11
|
def followers_ids(options={})
|
12
12
|
args = options.map{|k,v| "#{k}=#{v}"}.join('&')
|
13
13
|
get("/followers/ids.json?#{args}")
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
# Allows the authenticating user to follow the specified user. Returns the befriended user when successful.
|
17
17
|
def friend(id)
|
18
18
|
post("/friendships/create/#{id}.json")
|
19
19
|
end
|
20
|
-
|
21
|
-
# Allows the authenticating users to unfollow the specified user. Returns the unfollowed user when successful.
|
20
|
+
|
21
|
+
# Allows the authenticating users to unfollow the specified user. Returns the unfollowed user when successful.
|
22
22
|
def unfriend(id)
|
23
23
|
post("/friendships/destroy/#{id}.json")
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
# Tests for the existence of friendship between two users. Will return true if user_a follows user_b, otherwise will return false.
|
27
27
|
# You are better off using get_friendship as it returns more extended information.
|
28
28
|
def friends?(a, b)
|
29
29
|
oauth_response = access_token.get("/friendships/exists.json?user_a=#{a}&user_b=#{b}")
|
30
30
|
oauth_response.body.strip == 'true'
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
# Returns detailed information about the relationship between two users.
|
34
34
|
def get_friendship(a, b)
|
35
35
|
get("/friendships/show.json?source_screen_name=#{a}&target_screen_name=#{b}")
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
|
+
# Returns a cursored collection of user objects for every user the specified
|
39
|
+
# user is following (otherwise known as their "friends")
|
40
|
+
def friends(cursor=-1)
|
41
|
+
get("/friends/list.json?cursor=#{cursor}")
|
42
|
+
end
|
43
|
+
|
44
|
+
# Helper to retrun all friends via multiple requests
|
45
|
+
def all_friends(cursor=-1)
|
46
|
+
users = []
|
47
|
+
while cursor != 0 do
|
48
|
+
json = friends(cursor)
|
49
|
+
cursor = json["next_cursor"]
|
50
|
+
users += json["users"]
|
51
|
+
end
|
52
|
+
users
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns a cursored collection of user objects for users following the
|
56
|
+
# specified user.
|
57
|
+
def followers(cursor=-1)
|
58
|
+
get("/followers/list.json?cursor=#{cursor}")
|
59
|
+
end
|
60
|
+
|
61
|
+
# Helper to retrun all followers via multiple requests
|
62
|
+
def all_followers(cursor=-1)
|
63
|
+
users = []
|
64
|
+
while cursor != 0 do
|
65
|
+
json = followers(cursor)
|
66
|
+
cursor = json["next_cursor"]
|
67
|
+
users += json["users"]
|
68
|
+
end
|
69
|
+
users
|
70
|
+
end
|
71
|
+
|
38
72
|
end
|
39
73
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TwitterOAuth
|
2
|
+
class Client
|
3
|
+
|
4
|
+
# Returns the current rate limits for methods belonging to the specified
|
5
|
+
# resource families. Each 1.1 API resource belongs to a "resource family"
|
6
|
+
# which is indicated in its method documentation. You can typically
|
7
|
+
# determine a method's resource family from the first component of the path
|
8
|
+
# after the...
|
9
|
+
def rate_limit_status
|
10
|
+
get('/application/rate_limit_status.json')
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
data/lib/twitter_oauth/search.rb
CHANGED
@@ -2,34 +2,13 @@ require 'open-uri'
|
|
2
2
|
|
3
3
|
module TwitterOAuth
|
4
4
|
class Client
|
5
|
-
|
5
|
+
|
6
6
|
def search(q, options={})
|
7
|
-
options[:
|
8
|
-
options[:rpp] ||= 20
|
7
|
+
options[:count] ||= 20
|
9
8
|
options[:q] = URI.escape(q)
|
10
9
|
args = options.map{|k,v| "#{k}=#{v}"}.join('&')
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
# Returns the current top 10 trending topics on Twitter.
|
15
|
-
def current_trends
|
16
|
-
search_get("/trends/current.json")
|
17
|
-
end
|
18
|
-
|
19
|
-
# Returns the top 20 trending topics for each hour in a given day.
|
20
|
-
def daily_trends
|
21
|
-
search_get("/trends/daily.json")
|
10
|
+
get("/search/tweets.json?#{args}")
|
22
11
|
end
|
23
|
-
|
24
|
-
# Returns the top 30 trending topics for each day in a given week.
|
25
|
-
def weekly_trends
|
26
|
-
search_get("/trends/weekly.json")
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
def search_get(path)
|
31
|
-
response = open('http://search.twitter.com' + path, 'User-Agent' => 'github.com/moomerman/twitter_outh')
|
32
|
-
JSON.parse(response.read)
|
33
|
-
end
|
12
|
+
|
34
13
|
end
|
35
14
|
end
|
data/lib/twitter_oauth/trends.rb
CHANGED
@@ -1,25 +1,31 @@
|
|
1
1
|
module TwitterOAuth
|
2
2
|
class Client
|
3
|
-
|
4
|
-
# Returns the top
|
5
|
-
|
6
|
-
|
3
|
+
|
4
|
+
# Returns the top 10 trending topics for a specific WOEID, if trending
|
5
|
+
# information is available for it. The response is an array of "trend"
|
6
|
+
# objects that encode the name of the trending topic, the query parameter
|
7
|
+
# that can be used to search for the topic on Twitter Search, and the
|
8
|
+
# Twitter Search URL....
|
9
|
+
def place_trends
|
10
|
+
get("/trends/place.json")
|
7
11
|
end
|
8
|
-
|
9
|
-
# Returns the locations that Twitter has trending topic information for.
|
10
|
-
#
|
11
|
-
#
|
12
|
-
|
12
|
+
|
13
|
+
# Returns the locations that Twitter has trending topic information for. The
|
14
|
+
# response is an array of "locations" that encode the location's WOEID and
|
15
|
+
# some other human-readable information such as a canonical name and country
|
16
|
+
# the location belongs in. A WOEID is a Yahoo! Where On Earth ID.
|
17
|
+
def available_trends
|
13
18
|
get("/trends/available.json")
|
14
19
|
end
|
15
|
-
|
16
|
-
# Returns the
|
17
|
-
# The response is an array of "
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
def
|
22
|
-
get("/trends/
|
20
|
+
|
21
|
+
# Returns the locations that Twitter has trending topic information for,
|
22
|
+
# closest to a specified location. The response is an array of "locations"
|
23
|
+
# that encode the location's WOEID and some other human-readable information
|
24
|
+
# such as a canonical name and country the location belongs in.
|
25
|
+
# A WOEID is a Yahoo...
|
26
|
+
def closest_trends
|
27
|
+
get("/trends/closest.json")
|
23
28
|
end
|
29
|
+
|
24
30
|
end
|
25
31
|
end
|
data/lib/twitter_oauth/user.rb
CHANGED
@@ -1,59 +1,18 @@
|
|
1
1
|
module TwitterOAuth
|
2
2
|
class Client
|
3
|
-
|
4
|
-
# Returns the 100 last friends
|
5
|
-
# The page parameter is implemented for legacy reasons, but use of this is slow
|
6
|
-
# as passing page is no longer supported by the Twitter API as the use of cursors
|
7
|
-
# is now obligitory. It is recommended that you use all_friends instead
|
8
|
-
def friends(page=1)
|
9
|
-
return get("/statuses/friends.json?page=#{page}") if page == 1
|
10
|
-
users = []
|
11
|
-
cursor = "-1"
|
12
|
-
page.times do
|
13
|
-
return [] if cursor == 0
|
14
|
-
json = get("/statuses/friends.json?cursor=#{cursor}")
|
15
|
-
cursor = json["next_cursor"]
|
16
|
-
users = json["users"]
|
17
|
-
end
|
18
|
-
users
|
19
|
-
end
|
20
3
|
|
21
|
-
# Returns
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
while cursor != 0 do
|
26
|
-
json = get("/statuses/friends.json?cursor=#{cursor}")
|
27
|
-
cursor = json["next_cursor"]
|
28
|
-
users += json["users"]
|
29
|
-
end
|
30
|
-
users
|
4
|
+
# Returns settings (including current trend, geo and sleep time information)
|
5
|
+
# for the authenticating user.
|
6
|
+
def settings
|
7
|
+
get('/account/settings.json')
|
31
8
|
end
|
32
|
-
|
33
|
-
# Returns the 100 last followers
|
34
|
-
def followers(page=1)
|
35
|
-
return get("/statuses/followers.json?page=#{page}") if page == 1
|
36
|
-
users = []
|
37
|
-
cursor = "-1"
|
38
|
-
page.times do
|
39
|
-
return [] if cursor == 0
|
40
|
-
json = get("/statuses/followers.json?cursor=#{cursor}")
|
41
|
-
cursor = json["next_cursor"]
|
42
|
-
users = json["users"]
|
43
|
-
end
|
44
|
-
users
|
45
|
-
end
|
46
9
|
|
47
|
-
# Returns
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
cursor = json["next_cursor"]
|
54
|
-
users += json["users"]
|
55
|
-
end
|
56
|
-
users
|
10
|
+
# Returns an HTTP 200 OK response code and a representation of the
|
11
|
+
# requesting user if authentication was successful; returns a 401 status
|
12
|
+
# code and an error message if not. Use this method to test if supplied user
|
13
|
+
# credentials are valid.
|
14
|
+
def verify_credentials
|
15
|
+
get('/account/verify_credentials.json')
|
57
16
|
end
|
58
17
|
|
59
18
|
end
|
metadata
CHANGED
@@ -1,94 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter_oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.9
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Richard Taylor
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: oauth
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.4.1
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.4.1
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 1.1.9
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 1.1.9
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: mime-types
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '1.16'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '1.16'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: shoulda
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: mocha
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
description: twitter_oauth is a Ruby client for the Twitter API using OAuth.
|
@@ -107,6 +96,7 @@ files:
|
|
107
96
|
- lib/twitter_oauth/favorites.rb
|
108
97
|
- lib/twitter_oauth/friendships.rb
|
109
98
|
- lib/twitter_oauth/geo.rb
|
99
|
+
- lib/twitter_oauth/help.rb
|
110
100
|
- lib/twitter_oauth/lists.rb
|
111
101
|
- lib/twitter_oauth/notifications.rb
|
112
102
|
- lib/twitter_oauth/saved_searches.rb
|
@@ -119,6 +109,7 @@ files:
|
|
119
109
|
- lib/twitter_oauth/utils.rb
|
120
110
|
homepage: http://github.com/moomerman/twitter_oauth
|
121
111
|
licenses: []
|
112
|
+
metadata: {}
|
122
113
|
post_install_message:
|
123
114
|
rdoc_options:
|
124
115
|
- --inline-source
|
@@ -126,20 +117,18 @@ rdoc_options:
|
|
126
117
|
require_paths:
|
127
118
|
- lib
|
128
119
|
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
120
|
requirements:
|
131
|
-
- -
|
121
|
+
- - '>='
|
132
122
|
- !ruby/object:Gem::Version
|
133
123
|
version: '0'
|
134
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
-
none: false
|
136
125
|
requirements:
|
137
|
-
- -
|
126
|
+
- - '>='
|
138
127
|
- !ruby/object:Gem::Version
|
139
128
|
version: '0'
|
140
129
|
requirements: []
|
141
130
|
rubyforge_project: twitter_oauth
|
142
|
-
rubygems_version:
|
131
|
+
rubygems_version: 2.0.0
|
143
132
|
signing_key:
|
144
133
|
specification_version: 2
|
145
134
|
summary: twitter_oauth is a Ruby client for the Twitter API using OAuth.
|