twitter_oauth 0.4.92 → 0.4.93

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25fe3c35e12ca4a7deda52b863b614b935e42ef5
4
- data.tar.gz: 9d106d1e6c663c8873b72a104cf945ca05dfa8e8
3
+ metadata.gz: b1396da5bb6b97fbd4f044e192184c3ab678b863
4
+ data.tar.gz: 52e0201073279363ebf2cd89ee7b78d8cd7c5a74
5
5
  SHA512:
6
- metadata.gz: 4ae8d4803de02768dbec3c1bb33e23b7d8d53fedf3cd99eb2f845e165c4536162baf60740e3eeb178a2fd271f6c67fd84da1c7e0c4513082d473ec974c834247
7
- data.tar.gz: 84c04c346bf570c30dc73a7443023a31459bcbea0c4763140949ed4f4d0d269d32633b1832dc0329e7ef86e55797b8fb53a2852b48378fd66488998c865b6efa
6
+ metadata.gz: 5d9455ca2ac54a02b9f4bf109d3aeb1ce07e3a85bce1d90c342dd4f721b6a318e604f0c3efd329615cd86ea2587fc533772e2e3c33fa4132d241fdfacaa9fc8f
7
+ data.tar.gz: 2132e6b8636b7759f5bdf38f4a95e5f54138929a06fc3910d45a843fa78fd52acf168ff528dea0cb835a6ed51589839b5ae36b776b3506e14be1fdce5e5094de
@@ -1,8 +1,14 @@
1
1
  h1. Twitter OAuth REST API client library for Ruby
2
2
 
3
+ h2. Current Status
4
+
5
+ Twitter turned off access to the v1 API so this project is currently migrating to v1.1. Unfortunately everything is not backward-compatible.
6
+
7
+ The v.0.4.9x series of this gem is work in progress getting the library compatible with Twitter v1.1 - when complete we will push v0.5.0 of this library.
8
+
3
9
  h2. Install the gem
4
10
 
5
- sudo gem install twitter_oauth # (via gemcutter)
11
+ gem 'twitter_oauth'
6
12
 
7
13
  h2. Using the gem
8
14
 
@@ -12,24 +18,7 @@ See "sinitter":http://github.com/moomerman/sinitter/tree/master for a full websi
12
18
 
13
19
  h2. Unauthorized request example
14
20
 
15
- The Twitter API can be called to make public requests without needing any client credentials.
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.
18
-
19
- <pre><code>client = TwitterOAuth::Client.new
20
-
21
- puts client.show('twitter')
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"}
23
- </code></pre>
24
-
25
- You can also access to the search API which is available in either authorized or unauthorized modes.
26
-
27
- <pre><code>search = client.search('twitter')
28
- search.results.size => 20
29
- search.results.first.from_user => "josephpred"
30
- search.results.first.text
31
- => "Useful public service Twitter account for those of you hitting Tahoe or just needing to cross the pass to Reno: @i80chains"
32
- </code></pre>
21
+ Since Twitter API v1.1 all requests are required to be authorized.
33
22
 
34
23
  h2. Authorized request example
35
24
 
@@ -5,5 +5,5 @@ require 'mime/types'
5
5
  require 'twitter_oauth/client'
6
6
 
7
7
  module TwitterOAuth
8
- VERSION = '0.4.92'
8
+ VERSION = '0.4.93'
9
9
  end
@@ -9,6 +9,10 @@ module TwitterOAuth
9
9
  return oauth_response.class == Net::HTTPOK
10
10
  end
11
11
 
12
+ def info
13
+ get('/account/verify_credentials.json')
14
+ end
15
+
12
16
  # Updates profile background image. Takes a File object and optional tile argument.
13
17
  # Returns extended user info object.
14
18
  def update_profile_background_image(image, tile = false)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.92
4
+ version: 0.4.93
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor