Parent

Class/Module Index [+]

Quicksearch

Twitter::Client

Wrapper for the Twitter REST API

@note All methods have been separated into modules and follow the same grouping used in {dev.twitter.com/doc the Twitter API Documentation}. @see dev.twitter.com/pages/every_developer

Public Class Methods

new(options={}) click to toggle source

Initializes a new Client object

@param options [Hash] @return [Twitter::Client]

# File lib/twitter/client.rb, line 53
def initialize(options={})
  Twitter::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || Twitter.instance_variable_get(:"@#{key}"))
  end
end

Public Instance Methods

delete(path, params={}) click to toggle source

Perform an HTTP DELETE request

# File lib/twitter/client.rb, line 60
def delete(path, params={})
  request(:delete, path, params)
end
get(path, params={}) click to toggle source

Perform an HTTP GET request

# File lib/twitter/client.rb, line 65
def get(path, params={})
  request(:get, path, params)
end
post(path, params={}) click to toggle source

Perform an HTTP POST request

# File lib/twitter/client.rb, line 70
def post(path, params={})
  signature_params = params.values.any?{|value| value.respond_to?(:to_io)} ? {} : params
  request(:post, path, params, signature_params)
end
put(path, params={}) click to toggle source

Perform an HTTP PUT request

# File lib/twitter/client.rb, line 76
def put(path, params={})
  request(:put, path, params)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.