Package: tweethon
-*- markdown -*-# Python Twitter #_A python wrapper around the Twitter API_* Author: `Jeremy Rossi <jeremy@jeremyrossi.com>`* Org Author: `DeWitt Clinton <dewitt@google.com>`## Introduction ##This library provides a pure python interface for the Twitter API.Twitter (http://twitter.com) provides a service that allows people toconnect via the web, IM, and SMS.  Twitter exposes a web services API(http://twitter.com/help/api) and this library is intended to makeit even easier for python programmers to use.## Building ##### From source: ###Install the dependencies:* [simplejson](http://cheeseshop.python.org/pypi/simplejson)Download the latest tweethonlibrary from:* [tweethon](http://bitbucket.org/jrossi/tweethon/)Untar the source distribution and run:$ python setup.py build$ python setup.py install### Testing: ###With setuptools installed:$ python setup.py testWithout setuptools installed:$ python tweethon_test.py## Getting the code ##View the trunk at:http://bitbucket.org/jrossi/tweethon/src/Check out the latest development version anonymously with mercurial:$ hg clone http://bitbucket.org/jrossi/tweethon/## Documentation ##View the last release API documentation at:* [PyTwitter](http://bitbucket.org/jrossi/tweethon/wiki/Home)## Using ##The library provides a python wrapper around the Twitter API andthe twitter data model.### Model: ###The three model classes are `twitter.Status`, `twitter.User`, and`twitter.DirectMessage`.  The API methods return instances of theseclasses.To read the full API for `twitter.Status`, `twitter.User`, or`twitter.DirectMessage`, run:$ pydoc tweethon.Status$ pydoc tweethon.User$ pydoc tweethon.DirectMessage### API: ###The API is exposed via the `twitter.Api` class.To create an instance of the `twitter.Api` class:>>> import tweethong>>> api = tweethon.Api()To create an instance of the `twitter.Api` with login credentials (many APIcalls required the client to be authenticated):>>> api = tweethon.Api(username='username', password='password)To fetch the most recently posted public twitter status messages:>>> statuses = api.GetPublicTimeline()>>> print [s.user.name for s in statuses][u'DeWitt', u'Kesuke Miyagi', u'ev', u'Buzz Andersen', u'Biz Stone']To fetch a single user's public status messages, where "user" is eithera Twitter "short name" or their user id.>>> statuses = api.GetUserTimeline(user)>>> print [s.text for s in statuses]To fetch a list a user's friends (requires authentication):>>> users = api.GetFriends()>>> print [u.name for u in users]To post a twitter status message (requires authentication):>>> status = api.PostUpdate(username, password, 'I love python-twitter!')>>> print status.textI love python-twitter!There are many more API methods, to read the full API documentation:$ pydoc tweethon.Api## Convert from python-twitter ##PyTwitter is a complete fork of the python-twitter codebase.  I am planning on keepingtweethon as drop in replacement for python-twitter.  To make this work seamlessly usethe following import idiom:>>> import tweethon as twitter## More Information #### Contributors ##Additional thanks to Pierre-Jean Coudert, Omar Kilani, Jodok Batlogg,edleaf,glen.tregoning, Brad Choate, Jim Cortez, Jason Lemoine, ThomasDyson, Robert Laquey, and the rest of the python-twitter mailing list.## License ##> Copyright 2007 Google Inc. All Rights Reserved.>> Licensed under the Apache License, Version 2.0 (the 'License');> you may not use this file except in compliance with the License.> You may obtain a copy of the License at>>     http://www.apache.org/licenses/LICENSE-2.0>> Unless required by applicable law or agreed to in writing, software> distributed under the License is distributed on an 'AS IS' BASIS,> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.> See the License for the specific language governing permissions and> limitations under the License.2009-03-11Added page parameter to GetReplies, GetFriends, GetFollowers, and GetDirectMessages2009-03-03Added count parameter to GetFriendsTimeline2009-03-01Add PostUpdates, which automatically splits long text into multiple updates.2009-02-25Add in_reply_to_status_id to api.PostUpdate2009-02-21Wrap any error responses in a TwitterErrorAdd since_id to GetFriendsTimeline and GetUserTimeline2009-02-20Added since and since_id to Api.GetReplies2008-07-10Added new properties to User and Status classes.Removed spurious self-import of the twitter moduleAdded a NOTICE fileRequire simplejson 2.x or laterAdded get/create/destroy favorite flags for status messages.Bug fix for non-tty devices.2007-09-13Unset the executable bit on README.2007-09-13Released version 0.5.Added back support for setuptools (conditionally)Added support for X-Twitter-* HTTP headersFixed the tests to work across all timezonesRemoved the 140 character limit from PostUpdateAdded support for per-user tmp cache directories2007-06-13Released 0.4.Fixed a unicode error that prevented tweet.py from working.Added DestroyStatusAdded DestroyDirectMessageAdded CreateFriendshipAdded DestoryFriendship2007-06-03Fixed the bug that prevented unicode strings being postedUsername and password now set on twitter.Api, not individual method callsAdded SetCredentials and ClearCredentialsAdded GetUser ("users/show" in the twitter web api)Added GetFeaturedAdded GetDirectMessagesAdded GetStatus ("statuses/show" in the twitter web api)Added GetRepliesAdded optional since_id parameter on GetPublicTimelineAdded optional since parameter on GetUserTimelineAdded optional since and user parameters on GetFriendsTimelineAdded optional user parameter on GetFriends2007-04-27Modified examples/twitter-to-xhtml.py to handle unicodeDropped dependency on setuptools (too complicated/buggy)Added unicode test casesFixed issue 2 "Rename needs an unlink in front"2007-04-02Released 0.3.Use gmtime not localtime to calculate relative_created_at.2007-03-26Released 0.2GetUserTimeline can accept userid or username.2007-03-21Calculate relative_created_at on the fly2007-01-28Released 0.1Initial checkin of python-twitter