github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jnunemaker / twitter

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 682
    • 137
  • Source
  • Commits
  • Network (137)
  • Issues (9)
  • Downloads (34)
  • Wiki (1)
  • Graphs
  • Tree: 9b880c4

click here to add a description

click here to add a homepage

  • Branches (3)
    • integration
    • master
    • twitter-search
  • Tags (34)
    • v0.8.3
    • v0.8.2
    • v0.8.1
    • v0.8.0
    • v0.7.11
    • v0.7.10
    • v0.7.9
    • v0.7.8
    • v0.7.7
    • v0.7.6
    • v0.7.5
    • v0.7.4
    • v0.7.3
    • v0.7.2
    • v0.7.0
    • v0.6.15
    • v0.6.14
    • v0.6.13
    • v0.6.12
    • v0.6.11
    • v0.6.10
    • v0.6.9
    • v0.6.8
    • v0.6.7
    • v0.6.6
    • v0.6.5
    • v0.6.4
    • v0.6.3
    • v0.6.2
    • v0.6.1
    • v0.6.0
    • v0.5.3
    • v0.5.2
    • v0.5.1
Sending Request…
Click here to lend your support to: twitter and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

API wrapper for Twitter and Twitter Search API's — Read more

  cancel

http://twitter.rubyforge.org/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

updated readme with rdoc info. 
jnunemaker (author)
Thu Apr 30 05:04:07 -0700 2009
commit  9b880c4be0a43bf3ea6fd4f5ec1d6c120e6c2b11
tree    d9aea31bc666b417ed80b7731aec78f382c8b783
parent  4b098e6e824ab852c49b42d40fd3579de4e2cc21
twitter / lib / twitter / oauth.rb lib/twitter/oauth.rb
100644 34 lines (27 sloc) 0.916 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module Twitter
  class OAuth
    extend Forwardable
    def_delegators :access_token, :get, :post
    
    attr_reader :ctoken, :csecret
    
    def initialize(ctoken, csecret)
      @ctoken, @csecret = ctoken, csecret
    end
    
    def consumer
      @consumer ||= ::OAuth::Consumer.new(@ctoken, @csecret, {:site => 'http://twitter.com'})
    end
    
    def request_token
      @request_token ||= consumer.get_request_token
    end
    
    def authorize_from_request(rtoken, rsecret)
      request_token = ::OAuth::RequestToken.new(consumer, rtoken, rsecret)
      access_token = request_token.get_access_token
      @atoken, @asecret = access_token.token, access_token.secret
    end
    
    def access_token
      @access_token ||= ::OAuth::AccessToken.new(consumer, @atoken, @asecret)
    end
    
    def authorize_from_access(atoken, asecret)
      @atoken, @asecret = atoken, asecret
    end
  end
end
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server