Parent

Included Modules

Files

Twitter::HTTPAuth

Attributes

username[R]
password[R]
options[R]

Public Class Methods

new(username, password, options={}) click to toggle source
    # File lib/twitter/httpauth.rb, line 9
 9:     def initialize(username, password, options={})
10:       
11:       @username, @password = username, password
12:       @options = {:ssl => false}.merge(options)
13:       options[:api_endpoint] ||= "api.twitter.com"
14: 
15:       if options[:api_version] == false
16:         version_path = ''
17:       else
18:         options[:api_version] ||= API_VERSION
19:         version_path = "/#{options[:api_version]}"
20:       end
21: 
22:       self.class.base_uri "http#{'s' if options[:ssl]}://#{options[:api_endpoint]}#{version_path}"
23:       self.class.default_timeout options[:timeout] if options[:timeout]
24:     end

Public Instance Methods

delete(uri, body={}, headers={}) click to toggle source
    # File lib/twitter/httpauth.rb, line 41
41:     def delete(uri, body={}, headers={})
42:       
43:       self.class.delete(uri, :body => body, :headers => headers, :basic_auth => basic_auth)
44:     end
get(uri, headers={}) click to toggle source
    # File lib/twitter/httpauth.rb, line 26
26:     def get(uri, headers={})
27:       
28:       self.class.get(uri, :headers => headers, :basic_auth => basic_auth)
29:     end
post(uri, body={}, headers={}) click to toggle source
    # File lib/twitter/httpauth.rb, line 31
31:     def post(uri, body={}, headers={})
32:       
33:       self.class.post(uri, :body => body, :headers => headers, :basic_auth => basic_auth)
34:     end
put(uri, body={}, headers={}) click to toggle source
    # File lib/twitter/httpauth.rb, line 36
36:     def put(uri, body={}, headers={})
37:       
38:       self.class.put(uri, :body => body, :headers => headers, :basic_auth => basic_auth)
39:     end

Private Instance Methods

basic_auth() click to toggle source
    # File lib/twitter/httpauth.rb, line 48
48:     def basic_auth
49:       @basic_auth ||= {:username => @username, :password => @password}
50:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.