* import the `twitter` package and run help() on it
* run `twitter -h` for command-line tool help
- * run `twitterbot -h` for IRC bot help
- * visit http://mike.verdone.ca/twitter for more info
-
twitter - The Command-Line Tool
-------------------------------
-The command-line tool currently supports the following things:
+The command-line tool lets you do some awesome things:
- * view your friends' recent tweets
- * view your recent replies
+ * view your tweets, recent replies, and tweets in lists
* view the public timeline
* follow and unfollow (leave) friends
- * view tweets from lists
* various output formats for tweet information
- * read your username and password from a config file
The bottom line: type `twitter`, receive tweets.
a complete offsite backup of all your tweets. Run `twitter-log` and
read the instructions.
+twitter-archiver and twitter-follow
+-----------------------------------
+
+twitter-archiver will log all the tweets posted by any user since they
+started posting. twitter-follow will print a list of all of all the
+followers of a user (or all the users that user follows).
+
Programming with the Twitter api classes
========================================
Examples::
- twitter = Twitter(
+ t = Twitter(
auth=OAuth(token, token_key, con_secret, con_secret_key)))
# Get the public timeline
- twitter.statuses.public_timeline()
+ t.statuses.public_timeline()
# Get a particular friend's timeline
- twitter.statuses.friends_timeline(id="billybob")
+ t.statuses.friends_timeline(id="billybob")
# Also supported (but totally weird)
- twitter.statuses.friends_timeline.billybob()
+ t.statuses.friends_timeline.billybob()
+
+ # Update your status
+ t.statuses.update(
+ status="Using @sixohsix's sweet Python Twitter Tools.")
# Send a direct message
- twitter.direct_messages.new(
+ t.direct_messages.new(
user="billybob",
text="I think yer swell!")
- # Get the members of a particular list of a particular friend
- twitter.user.listname.members(user="billybob", listname="billysbuds")
+ # Get the members of tamtar's list "Things That Are Rad"
+ t._("tamtar")._("things-that-are-rad").members()
+
+ # Note how the magic `_` method can be used to insert data
+ # into the middle of a call. You can also use replacement:
+ t.user.list.members(user="tamtar", list="things-that-are-rad")
Searching Twitter::