Parent

Class/Module Index [+]

Quicksearch

Twitter::Request

Attributes

client[RW]
options[RW]
path[RW]
request_method[RW]
verb[RW]

Public Class Methods

new(client, request_method, path, options = {}) click to toggle source

@param client [Twitter::Client] @param request_method [String, Symbol] @param path [String] @param options [Hash] @return [Twitter::Request]

# File lib/twitter/request.rb, line 13
def initialize(client, request_method, path, options = {})
  @client = client
  @request_method = request_method.to_sym
  @path = path
  @options = options
end

Public Instance Methods

perform() click to toggle source

@return [Hash]

# File lib/twitter/request.rb, line 21
def perform
  @client.send(@request_method, @path, @options).body
end
perform_with_cursor(collection_name, klass = nil) click to toggle source

@param collection_name [Symbol] @param klass [Class] @return [Twitter::Cursor]

# File lib/twitter/request.rb, line 35
def perform_with_cursor(collection_name, klass = nil)
  Twitter::Cursor.new(perform, collection_name.to_sym, klass, self)
end
perform_with_object(klass) click to toggle source

@param klass [Class] @param request [Twitter::Request] @return [Object]

# File lib/twitter/request.rb, line 28
def perform_with_object(klass)
  klass.new(perform)
end
perform_with_objects(klass) click to toggle source

@param klass [Class] @return [Array]

# File lib/twitter/request.rb, line 41
def perform_with_objects(klass)
  perform.collect do |element|
    klass.new(element)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.