Module: Twtr

Defined in:
lib/twtr/version.rb,
lib/twtr.rb,
lib/twtr/client.rb,
lib/twtr/config.rb,
lib/twtr/errors.rb,
lib/twtr/screen.rb,
lib/twtr/console.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Config, Screen, VERSION Classes: Client, ConfigFileNotFoundException, Console, ResponseErrorException, UnknownSubcommandException

Constant Summary collapse

HTTP_ERRORS =
{
  400 => "Bad Request",
  401 => "Not Authorized",
  403 => "Forbidden",
  404 => "Not Found",
  500 => "Internal Server Error",
  502 => "Bad Gateway (Twitter is down or being upgraded.)",
  503 => "Service Unavailable (Try again later.)",
}
DESCRIPTION =
<<-_TEXT_
Twtr Copyright (c) 2008 Ryota Maruko
DESCRIPTION
    twtr is a imprementaion of twitter client.
    Features are
     * Command line application.
     * Simple Twitter library.
     * Http Proxy available.
     * Double Byte Encoding. e.g) ShiftJIS, EUC-JP, etc.

SYNOPSIS
    twtr [subcommand] [options]
    ex)
      $ twtr setting              # => (Re)set config file.
      $ twtr ft                   # => Show friends timeline.
      $ twtr pt -P 2              # => Show public timeline (page 2).
      $ twtr ut -i bob            # => Show someone's timeline.
      $ twtr rp                   # => Show replies.
      $ twtr up -m "hello world"  # => Update message.
      $ twtr friends              # => Show friends.
      $ twtr friedns -i bob       # => Show bob's friends.
      $ twtr ul -l "Tokyo, Japan" # => Update location.
      $ twtr rls                  # => The remaining number of API requests.

SUBCMMAND
    setting (reset)         # (Re)Set twtr configuration.
    friends_timeline (ft)   # Show friends timeline.
    putlic_timeline (pt)    # Show public timeline.
    user_timeline (ut)      # Show user timeline. -i, --id  option required.
    replies (rp)            # Show replies.
    update (up)             # Updates your status. -m, --message option required.
    friends (fds)           # Show friends. available -i, --id  option.
    update_location (ul)    # Update location. -l, --location option required.
    rate_limit_status (rls) # The remaining number of API requests.
    
_TEXT_

Class Method Summary collapse

Class Method Details

.is_win?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/twtr.rb', line 5

def self.is_win?
  (RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/) ? true : false
end