Skip to content


Subversion checkout URL

You can clone with
Download ZIP
command line tweets and an api wrapper for twitter
Branch: master
Pull request Compare This branch is 7 commits ahead, 2392 commits behind sferik:master.
Failed to load latest commit information.
examples Added page to search. Also added spec for it and added it to an example.
lib Fixes a silly bug in outputting the response.body in the else case
website removed uses from website
.gitignore - exception handling fixed after manual testing
History Prepped for 0.4.2 release.
License Removed active support and switched to echoe for gem management.
Manifest Updating gemspec to 0.4.2
README Updating ReadMe with more info about this fork, no code changes.
Rakefile Removed active support and switched to echoe for gem management.
twitter.gemspec Fixes a silly bug in outputting the response.body in the else case


= Fork Info:

I forked this off of jnunemaker's twitter gem. This was forked before version 0.5. I plan to keep it at version 0.4.2's codebase because:

* Not ready to switch over to OAuth yet in my own apps, since Twitter has no date set yet
* My apps (, require the exception handling i've added here.

You can read more about what this fork offers on the wiki:

= addicted to twitter

... a sweet little diddy that helps you twitter your life away

== Install

sudo gem install twitter will work just fine. For command line use, you'll need a few other gems: sudo gem install main highline activerecord sqlite3-ruby

== Examples'your email', 'your password').update('watching veronica mars')
	# or you can use post'your email', 'your password').post('post works too')

	puts "Public Timeline", "=" * 50'your email', 'your password').timeline(:public).each do |s|
	  puts s.text,

	puts '', "Friends Timeline", "=" * 50'your email', 'your password').timeline.each do |s|
	  puts s.text,

	puts '', "Friends", "=" * 50'your email', 'your password').friends.each do |u|
	  puts, u.status.text

	puts '', "Followers", "=" * 50'your email', 'your password').followers.each do |u|
	  puts, u.status.text
== Search Examples'httparty').each { |r| puts r.inspect }'httparty').from('jnunemaker').each { |r| puts r.inspect }'jnunemaker').to('oaknd1').each { |r| puts r.inspect }

== Command Line Use

Note: If you want to use twitter from the command line be sure that sqlite3 and the sqlite3-ruby gem are installed. I removed the sqlite3-ruby gem as a dependency because you shouldn't need that to just use the API wrapper. Eventually I'll move the CLI interface into another gem.
	$ twitter

Will give you a list of all the commands. You can get the help for each command by running twitter [command] -h. 

The first thing you'll want to do is install the database so your account(s) can be stored. 

	$ twitter install
You can always uninstall twitter like this:

	$ twitter uninstall
Once the twitter database is installed and migrated, you can add accounts like this:

	$ twitter add
	Add New Account:
	Username: jnunemaker
	Password (won't be displayed): 
	Account added.

You can also list all the accounts you've added.

	$ twitter list
	Account List
	* jnunemaker

The * means denotes the account that will be used when posting, befriending, defriending, following, leaving or viewing a timeline.

To post using the account marked with the *, simply type the following:

	$ twitter post "releasing my new twitter gem"

That is about it. You can do pretty much anything that you can do with twitter from the command line interface.
Something went wrong with that request. Please try again.