Parent

Included Modules

Class/Module Index [+]

Quicksearch

Twitter::Client

Attributes

access_token[RW]
access_token_secret[RW]
consumer_key[RW]
consumer_secret[RW]
proxy[RW]
user_agent[W]

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 21
def initialize(options = {})
  options.each do |key, value|
    send(:"#{key}=", value)
  end
  yield(self) if block_given?
  validate_credential_type!
end

Public Instance Methods

credentials() click to toggle source

@return [Hash]

# File lib/twitter/client.rb, line 40
def credentials
  {
    :consumer_key    => consumer_key,
    :consumer_secret => consumer_secret,
    :token           => access_token,
    :token_secret    => access_token_secret,
  }
end
credentials?() click to toggle source

@return [Boolean]

# File lib/twitter/client.rb, line 50
def credentials?
  credentials.values.all?
end
user_agent() click to toggle source

@return [String]

# File lib/twitter/client.rb, line 35
def user_agent
  @user_agent ||= "Twitter Ruby Gem #{Twitter::Version}"
end
user_token?() click to toggle source

@return [Boolean]

# File lib/twitter/client.rb, line 30
def user_token?
  !!(access_token && access_token_secret)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.