/doc/twitter.html
HTML | 2026 lines | 1808 code | 218 blank | 0 comment | 0 complexity | 18efb984b94b1834ef5c0d1b27eb7127 MD5 | raw file
Possible License(s): Apache-2.0
- <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html><head><title>Python: module twitter</title>
- </head><body bgcolor="#f0f0f8">
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
- <tr bgcolor="#7799ee">
- <td valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>twitter</strong></big></big> (version 0.8)</font></td
- ><td align=right valign=bottom
- ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="twitter.py">twitter.py</a></font></td></tr></table>
- <p><tt>A library that provides a Python interface to the Twitter API</tt></p>
- <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#aa55cc">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
-
- <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
- <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
- <a href="base64.html">base64</a><br>
- <a href="calendar.html">calendar</a><br>
- <a href="datetime.html">datetime</a><br>
- <a href="gzip.html">gzip</a><br>
- </td><td width="25%" valign=top><a href="httplib.html">httplib</a><br>
- <a href="oauth2.html">oauth2</a><br>
- <a href="os.html">os</a><br>
- <a href="rfc822.html">rfc822</a><br>
- <a href="json.html">json</a><br>
- </td><td width="25%" valign=top><a href="sys.html">sys</a><br>
- <a href="tempfile.html">tempfile</a><br>
- <a href="textwrap.html">textwrap</a><br>
- <a href="time.html">time</a><br>
- <a href="urllib.html">urllib</a><br>
- </td><td width="25%" valign=top><a href="urllib2.html">urllib2</a><br>
- <a href="urlparse.html">urlparse</a><br>
- </td></tr></table></td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ee77aa">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
-
- <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
- <td width="100%"><dl>
- <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
- </font></dt><dd>
- <dl>
- <dt><font face="helvetica, arial"><a href="twitter.html#Api">Api</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#DirectMessage">DirectMessage</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#Hashtag">Hashtag</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#List">List</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#Status">Status</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#Trend">Trend</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#Url">Url</a>
- </font></dt><dt><font face="helvetica, arial"><a href="twitter.html#User">User</a>
- </font></dt></dl>
- </dd>
- <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
- </font></dt><dd>
- <dl>
- <dt><font face="helvetica, arial"><a href="twitter.html#TwitterError">TwitterError</a>
- </font></dt></dl>
- </dd>
- </dl>
- <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="Api">class <strong>Api</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A python interface into the Twitter API<br>
- <br>
- By default, the <a href="#Api">Api</a> caches results for 1 minute.<br>
- <br>
- Example usage:<br>
- <br>
- To create an instance of the twitter.<a href="#Api">Api</a> class, with no authentication:<br>
- <br>
- >>> import twitter<br>
- >>> api = twitter.<a href="#Api">Api</a>()<br>
- <br>
- To fetch the most recently posted public twitter status messages:<br>
- <br>
- >>> statuses = api.<a href="#Api-GetPublicTimeline">GetPublicTimeline</a>()<br>
- >>> print [s.user.name for s in statuses]<br>
- [u'DeWitt', u'Kesuke Miyagi', u'ev', u'Buzz Andersen', u'Biz Stone'] #...<br>
- <br>
- To fetch a single user's public status messages, where "user" is either<br>
- a Twitter "short name" or their user id.<br>
- <br>
- >>> statuses = api.<a href="#Api-GetUserTimeline">GetUserTimeline</a>(user)<br>
- >>> print [s.text for s in statuses]<br>
- <br>
- To use authentication, instantiate the twitter.<a href="#Api">Api</a> class with a<br>
- consumer key and secret; and the oAuth key and secret:<br>
- <br>
- >>> api = twitter.<a href="#Api">Api</a>(consumer_key='twitter consumer key',<br>
- consumer_secret='twitter consumer secret',<br>
- access_token_key='the_key_given',<br>
- access_token_secret='the_key_secret')<br>
- <br>
- To fetch your friends (after being authenticated):<br>
- <br>
- >>> users = api.<a href="#Api-GetFriends">GetFriends</a>()<br>
- >>> print [u.name for u in users]<br>
- <br>
- To post a twitter status message (after being authenticated):<br>
- <br>
- >>> status = api.<a href="#Api-PostUpdate">PostUpdate</a>('I love python-twitter!')<br>
- >>> print status.text<br>
- I love python-twitter!<br>
- <br>
- There are many other methods, including:<br>
- <br>
- >>> api.<a href="#Api-PostUpdates">PostUpdates</a>(status)<br>
- >>> api.<a href="#Api-PostDirectMessage">PostDirectMessage</a>(user, text)<br>
- >>> api.<a href="#Api-GetUser">GetUser</a>(user)<br>
- >>> api.<a href="#Api-GetReplies">GetReplies</a>()<br>
- >>> api.<a href="#Api-GetUserTimeline">GetUserTimeline</a>(user)<br>
- >>> api.<a href="#Api-GetStatus">GetStatus</a>(id)<br>
- >>> api.<a href="#Api-DestroyStatus">DestroyStatus</a>(id)<br>
- >>> api.<a href="#Api-GetFriendsTimeline">GetFriendsTimeline</a>(user)<br>
- >>> api.<a href="#Api-GetFriends">GetFriends</a>(user)<br>
- >>> api.<a href="#Api-GetFollowers">GetFollowers</a>()<br>
- >>> api.<a href="#Api-GetFeatured">GetFeatured</a>()<br>
- >>> api.<a href="#Api-GetDirectMessages">GetDirectMessages</a>()<br>
- >>> api.<a href="#Api-PostDirectMessage">PostDirectMessage</a>(user, text)<br>
- >>> api.<a href="#Api-DestroyDirectMessage">DestroyDirectMessage</a>(id)<br>
- >>> api.<a href="#Api-DestroyFriendship">DestroyFriendship</a>(user)<br>
- >>> api.<a href="#Api-CreateFriendship">CreateFriendship</a>(user)<br>
- >>> api.<a href="#Api-GetUserByEmail">GetUserByEmail</a>(email)<br>
- >>> api.<a href="#Api-VerifyCredentials">VerifyCredentials</a>()<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="Api-ClearCredentials"><strong>ClearCredentials</strong></a>(self)</dt><dd><tt>Clear the any credentials for this instance</tt></dd></dl>
- <dl><dt><a name="Api-CreateFavorite"><strong>CreateFavorite</strong></a>(self, status)</dt><dd><tt>Favorites the status specified in the status parameter as the authenticating user.<br>
- Returns the favorite status when successful.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- The twitter.<a href="#Status">Status</a> instance to mark as a favorite.<br>
- Returns:<br>
- A twitter.<a href="#Status">Status</a> instance representing the newly-marked favorite.</tt></dd></dl>
- <dl><dt><a name="Api-CreateFriendship"><strong>CreateFriendship</strong></a>(self, user)</dt><dd><tt>Befriends the user specified in the user parameter as the authenticating user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- The ID or screen name of the user to befriend.<br>
- Returns:<br>
- A twitter.<a href="#User">User</a> instance representing the befriended user.</tt></dd></dl>
- <dl><dt><a name="Api-CreateList"><strong>CreateList</strong></a>(self, user, name, mode<font color="#909090">=None</font>, description<font color="#909090">=None</font>)</dt><dd><tt>Creates a new list with the give name<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user:<br>
- Twitter name to create the list for<br>
- name:<br>
- New name for the list<br>
- mode:<br>
- 'public' or 'private'.<br>
- Defaults to 'public'. [Optional]<br>
- description:<br>
- Description of the list. [Optional]<br>
- <br>
- Returns:<br>
- A twitter.<a href="#List">List</a> instance representing the new list</tt></dd></dl>
- <dl><dt><a name="Api-CreateSubscription"><strong>CreateSubscription</strong></a>(self, owner, list)</dt><dd><tt>Creates a subscription to a list by the authenticated user<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- owner:<br>
- <a href="#User">User</a> name or id of the owner of the list being subscribed to.<br>
- list:<br>
- The slug or list id to subscribe the user to<br>
- <br>
- Returns:<br>
- A twitter.<a href="#List">List</a> instance representing the list subscribed to</tt></dd></dl>
- <dl><dt><a name="Api-DestroyDirectMessage"><strong>DestroyDirectMessage</strong></a>(self, id)</dt><dd><tt>Destroys the direct message specified in the required ID parameter.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated, and the<br>
- authenticating user must be the recipient of the specified direct<br>
- message.<br>
- <br>
- Args:<br>
- id: The id of the direct message to be destroyed<br>
- <br>
- Returns:<br>
- A twitter.<a href="#DirectMessage">DirectMessage</a> instance representing the message destroyed</tt></dd></dl>
- <dl><dt><a name="Api-DestroyFavorite"><strong>DestroyFavorite</strong></a>(self, status)</dt><dd><tt>Un-favorites the status specified in the ID parameter as the authenticating user.<br>
- Returns the un-favorited status in the requested format when successful.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- The twitter.<a href="#Status">Status</a> to unmark as a favorite.<br>
- Returns:<br>
- A twitter.<a href="#Status">Status</a> instance representing the newly-unmarked favorite.</tt></dd></dl>
- <dl><dt><a name="Api-DestroyFriendship"><strong>DestroyFriendship</strong></a>(self, user)</dt><dd><tt>Discontinues friendship with the user specified in the user parameter.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- The ID or screen name of the user with whom to discontinue friendship.<br>
- Returns:<br>
- A twitter.<a href="#User">User</a> instance representing the discontinued friend.</tt></dd></dl>
- <dl><dt><a name="Api-DestroyList"><strong>DestroyList</strong></a>(self, user, id)</dt><dd><tt>Destroys the list from the given user<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user:<br>
- The user to remove the list from.<br>
- id:<br>
- The slug or id of the list to remove.<br>
- Returns:<br>
- A twitter.<a href="#List">List</a> instance representing the removed list.</tt></dd></dl>
- <dl><dt><a name="Api-DestroyStatus"><strong>DestroyStatus</strong></a>(self, id)</dt><dd><tt>Destroys the status specified by the required ID parameter.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated and the<br>
- authenticating user must be the author of the specified status.<br>
- <br>
- Args:<br>
- id:<br>
- The numerical ID of the status you're trying to destroy.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#Status">Status</a> instance representing the destroyed status message</tt></dd></dl>
- <dl><dt><a name="Api-DestroySubscription"><strong>DestroySubscription</strong></a>(self, owner, list)</dt><dd><tt>Destroys the subscription to a list for the authenticated user<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- owner:<br>
- The user id or screen name of the user that owns the<br>
- list that is to be unsubscribed from<br>
- list:<br>
- The slug or list id of the list to unsubscribe from<br>
- <br>
- Returns:<br>
- A twitter.<a href="#List">List</a> instance representing the removed list.</tt></dd></dl>
- <dl><dt><a name="Api-FilterPublicTimeline"><strong>FilterPublicTimeline</strong></a>(self, term, since_id<font color="#909090">=None</font>)</dt><dd><tt>Filter the public twitter timeline by a given search term on<br>
- the local machine.<br>
- <br>
- Args:<br>
- term:<br>
- term to search by.<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#Status">Status</a> instances, one for each message<br>
- containing the term</tt></dd></dl>
- <dl><dt><a name="Api-GetDirectMessages"><strong>GetDirectMessages</strong></a>(self, since<font color="#909090">=None</font>, since_id<font color="#909090">=None</font>, page<font color="#909090">=None</font>)</dt><dd><tt>Returns a list of the direct messages sent to the authenticating user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- since:<br>
- Narrows the returned results to just those statuses created<br>
- after the specified HTTP-formatted date. [Optional]<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#DirectMessage">DirectMessage</a> instances</tt></dd></dl>
- <dl><dt><a name="Api-GetFavorites"><strong>GetFavorites</strong></a>(self, user<font color="#909090">=None</font>, page<font color="#909090">=None</font>)</dt><dd><tt>Return a list of <a href="#Status">Status</a> objects representing favorited tweets.<br>
- By default, returns the (up to) 20 most recent tweets for the<br>
- authenticated user.<br>
- <br>
- Args:<br>
- user:<br>
- The twitter name or id of the user whose favorites you are fetching.<br>
- If not specified, defaults to the authenticated user. [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]</tt></dd></dl>
- <dl><dt><a name="Api-GetFeatured"><strong>GetFeatured</strong></a>(self)</dt><dd><tt>Fetch the sequence of twitter.<a href="#User">User</a> instances featured on twitter.com<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#User">User</a> instances</tt></dd></dl>
- <dl><dt><a name="Api-GetFollowerIDs"><strong>GetFollowerIDs</strong></a>(self, userid<font color="#909090">=None</font>, cursor<font color="#909090">=-1</font>)</dt><dd><tt>Fetch the sequence of twitter.<a href="#User">User</a> instances, one for each follower<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#User">User</a> instances, one for each follower</tt></dd></dl>
- <dl><dt><a name="Api-GetFollowers"><strong>GetFollowers</strong></a>(self, page<font color="#909090">=None</font>)</dt><dd><tt>Fetch the sequence of twitter.<a href="#User">User</a> instances, one for each follower<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#User">User</a> instances, one for each follower</tt></dd></dl>
- <dl><dt><a name="Api-GetFriendIDs"><strong>GetFriendIDs</strong></a>(self, user<font color="#909090">=None</font>, cursor<font color="#909090">=-1</font>)</dt><dd><tt>Returns a list of twitter user id's for every person<br>
- the specified user is following.<br>
- <br>
- Args:<br>
- user:<br>
- The id or screen_name of the user to retrieve the id list for<br>
- [Optional]<br>
- <br>
- Returns:<br>
- A list of integers, one for each user id.</tt></dd></dl>
- <dl><dt><a name="Api-GetFriends"><strong>GetFriends</strong></a>(self, user<font color="#909090">=None</font>, cursor<font color="#909090">=-1</font>)</dt><dd><tt>Fetch the sequence of twitter.<a href="#User">User</a> instances, one for each friend.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user:<br>
- The twitter name or id of the user whose friends you are fetching.<br>
- If not specified, defaults to the authenticated user. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#User">User</a> instances, one for each friend</tt></dd></dl>
- <dl><dt><a name="Api-GetFriendsTimeline"><strong>GetFriendsTimeline</strong></a>(self, user<font color="#909090">=None</font>, count<font color="#909090">=None</font>, page<font color="#909090">=None</font>, since_id<font color="#909090">=None</font>, retweets<font color="#909090">=None</font>, include_entities<font color="#909090">=None</font>)</dt><dd><tt>Fetch the sequence of twitter.<a href="#Status">Status</a> messages for a user's friends<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated if the user is private.<br>
- <br>
- Args:<br>
- user:<br>
- Specifies the ID or screen name of the user for whom to return<br>
- the friends_timeline. If not specified then the authenticated<br>
- user set in the twitter.<a href="#Api">Api</a> instance will be used. [Optional]<br>
- count:<br>
- Specifies the number of statuses to retrieve. May not be<br>
- greater than 100. [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- retweets:<br>
- If True, the timeline will contain native retweets. [Optional]<br>
- include_entities:<br>
- If True, each tweet will include a node called "entities,".<br>
- This node offers a variety of metadata about the tweet in a<br>
- discreet structure, including: user_mentions, urls, and<br>
- hashtags. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#Status">Status</a> instances, one for each message</tt></dd></dl>
- <dl><dt><a name="Api-GetLists"><strong>GetLists</strong></a>(self, user, cursor<font color="#909090">=-1</font>)</dt><dd><tt>Fetch the sequence of lists for a user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user:<br>
- The twitter name or id of the user whose friends you are fetching.<br>
- If the passed in user is the same as the authenticated user<br>
- then you will also receive private list data.<br>
- cursor:<br>
- "page" value that Twitter will use to start building the<br>
- list sequence from. -1 to start at the beginning.<br>
- Twitter will return in the result the values for next_cursor<br>
- and previous_cursor. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#List">List</a> instances, one for each list</tt></dd></dl>
- <dl><dt><a name="Api-GetMentions"><strong>GetMentions</strong></a>(self, since_id<font color="#909090">=None</font>, max_id<font color="#909090">=None</font>, page<font color="#909090">=None</font>)</dt><dd><tt>Returns the 20 most recent mentions (status containing @twitterID)<br>
- for the authenticating user.<br>
- <br>
- Args:<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- max_id:<br>
- Returns only statuses with an ID less than<br>
- (that is, older than) the specified ID. [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#Status">Status</a> instances, one for each mention of the user.</tt></dd></dl>
- <dl><dt><a name="Api-GetPublicTimeline"><strong>GetPublicTimeline</strong></a>(self, since_id<font color="#909090">=None</font>, include_rts<font color="#909090">=None</font>, include_entities<font color="#909090">=None</font>)</dt><dd><tt>Fetch the sequence of public twitter.<a href="#Status">Status</a> message for all users.<br>
- <br>
- Args:<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- include_rts:<br>
- If True, the timeline will contain native retweets (if they<br>
- exist) in addition to the standard stream of tweets. [Optional]<br>
- include_entities:<br>
- If True, each tweet will include a node called "entities,".<br>
- This node offers a variety of metadata about the tweet in a<br>
- discreet structure, including: user_mentions, urls, and<br>
- hashtags. [Optional]<br>
- <br>
- Returns:<br>
- An sequence of twitter.<a href="#Status">Status</a> instances, one for each message</tt></dd></dl>
- <dl><dt><a name="Api-GetRateLimitStatus"><strong>GetRateLimitStatus</strong></a>(self)</dt><dd><tt>Fetch the rate limit status for the currently authorized user.<br>
- <br>
- Returns:<br>
- A dictionary containing the time the limit will reset (reset_time),<br>
- the number of remaining hits allowed before the reset (remaining_hits),<br>
- the number of hits allowed in a 60-minute period (hourly_limit), and<br>
- the time of the reset in seconds since The Epoch (reset_time_in_seconds).</tt></dd></dl>
- <dl><dt><a name="Api-GetReplies"><strong>GetReplies</strong></a>(self, since<font color="#909090">=None</font>, since_id<font color="#909090">=None</font>, page<font color="#909090">=None</font>)</dt><dd><tt>Get a sequence of status messages representing the 20 most<br>
- recent replies (status updates prefixed with @twitterID) to the<br>
- authenticating user.<br>
- <br>
- Args:<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- since:<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#Status">Status</a> instances, one for each reply to the user.</tt></dd></dl>
- <dl><dt><a name="Api-GetRetweets"><strong>GetRetweets</strong></a>(self, statusid)</dt><dd><tt>Returns up to 100 of the first retweets of the tweet identified<br>
- by statusid<br>
- <br>
- Args:<br>
- statusid:<br>
- The ID of the tweet for which retweets should be searched for<br>
- <br>
- Returns:<br>
- A list of twitter.<a href="#Status">Status</a> instances, which are retweets of statusid</tt></dd></dl>
- <dl><dt><a name="Api-GetSearch"><strong>GetSearch</strong></a>(self, term, geocode<font color="#909090">=None</font>, since_id<font color="#909090">=None</font>, per_page<font color="#909090">=15</font>, page<font color="#909090">=1</font>, lang<font color="#909090">='en'</font>, show_user<font color="#909090">='true'</font>, query_users<font color="#909090">=False</font>)</dt><dd><tt>Return twitter search results for a given term.<br>
- <br>
- Args:<br>
- term:<br>
- term to search by.<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- geocode:<br>
- geolocation information in the form (latitude, longitude, radius)<br>
- [Optional]<br>
- per_page:<br>
- number of results to return. Default is 15 [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- lang:<br>
- language for results. Default is English [Optional]<br>
- show_user:<br>
- prefixes screen name in status<br>
- query_users:<br>
- If set to False, then all users only have screen_name and<br>
- profile_image_url available.<br>
- If set to True, all information of users are available,<br>
- but it uses lots of request quota, one per status.<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#Status">Status</a> instances, one for each message containing<br>
- the term</tt></dd></dl>
- <dl><dt><a name="Api-GetStatus"><strong>GetStatus</strong></a>(self, id)</dt><dd><tt>Returns a single status message.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated if the<br>
- status message is private.<br>
- <br>
- Args:<br>
- id:<br>
- The numeric ID of the status you are trying to retrieve.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#Status">Status</a> instance representing that status message</tt></dd></dl>
- <dl><dt><a name="Api-GetSubscriptions"><strong>GetSubscriptions</strong></a>(self, user, cursor<font color="#909090">=-1</font>)</dt><dd><tt>Fetch the sequence of Lists that the given user is subscribed to<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user:<br>
- The twitter name or id of the user<br>
- cursor:<br>
- "page" value that Twitter will use to start building the<br>
- list sequence from. -1 to start at the beginning.<br>
- Twitter will return in the result the values for next_cursor<br>
- and previous_cursor. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#List">List</a> instances, one for each list</tt></dd></dl>
- <dl><dt><a name="Api-GetTrendsCurrent"><strong>GetTrendsCurrent</strong></a>(self, exclude<font color="#909090">=None</font>)</dt><dd><tt>Get the current top trending topics<br>
- <br>
- Args:<br>
- exclude:<br>
- Appends the exclude parameter as a request parameter.<br>
- Currently only exclude=hashtags is supported. [Optional]<br>
- <br>
- Returns:<br>
- A list with 10 entries. Each entry contains the twitter.</tt></dd></dl>
- <dl><dt><a name="Api-GetTrendsDaily"><strong>GetTrendsDaily</strong></a>(self, exclude<font color="#909090">=None</font>, startdate<font color="#909090">=None</font>)</dt><dd><tt>Get the current top trending topics for each hour in a given day<br>
- <br>
- Args:<br>
- startdate:<br>
- The start date for the report.<br>
- Should be in the format YYYY-MM-DD. [Optional]<br>
- exclude:<br>
- Appends the exclude parameter as a request parameter.<br>
- Currently only exclude=hashtags is supported. [Optional]<br>
- <br>
- Returns:<br>
- A list with 24 entries. Each entry contains the twitter.<br>
- <a href="#Trend">Trend</a> elements that were trending at the corresponding hour of the day.</tt></dd></dl>
- <dl><dt><a name="Api-GetTrendsWeekly"><strong>GetTrendsWeekly</strong></a>(self, exclude<font color="#909090">=None</font>, startdate<font color="#909090">=None</font>)</dt><dd><tt>Get the top 30 trending topics for each day in a given week.<br>
- <br>
- Args:<br>
- startdate:<br>
- The start date for the report.<br>
- Should be in the format YYYY-MM-DD. [Optional]<br>
- exclude:<br>
- Appends the exclude parameter as a request parameter.<br>
- Currently only exclude=hashtags is supported. [Optional]<br>
- Returns:<br>
- A list with each entry contains the twitter.<br>
- <a href="#Trend">Trend</a> elements of trending topics for the corrsponding day of the week</tt></dd></dl>
- <dl><dt><a name="Api-GetUser"><strong>GetUser</strong></a>(self, user)</dt><dd><tt>Returns a single user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user: The twitter name or id of the user to retrieve.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#User">User</a> instance representing that user</tt></dd></dl>
- <dl><dt><a name="Api-GetUserByEmail"><strong>GetUserByEmail</strong></a>(self, email)</dt><dd><tt>Returns a single user by email address.<br>
- <br>
- Args:<br>
- email:<br>
- The email of the user to retrieve.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#User">User</a> instance representing that user</tt></dd></dl>
- <dl><dt><a name="Api-GetUserRetweets"><strong>GetUserRetweets</strong></a>(self, count<font color="#909090">=None</font>, since_id<font color="#909090">=None</font>, max_id<font color="#909090">=None</font>, include_entities<font color="#909090">=False</font>)</dt><dd><tt>Fetch the sequence of retweets made by a single user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- count:<br>
- The number of status messages to retrieve. [Optional]<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- max_id:<br>
- Returns results with an ID less than (that is, older than) or<br>
- equal to the specified ID. [Optional]<br>
- include_entities:<br>
- If True, each tweet will include a node called "entities,".<br>
- This node offers a variety of metadata about the tweet in a<br>
- discreet structure, including: user_mentions, urls, and<br>
- hashtags. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of twitter.<a href="#Status">Status</a> instances, one for each message up to count</tt></dd></dl>
- <dl><dt><a name="Api-GetUserTimeline"><strong>GetUserTimeline</strong></a>(self, id<font color="#909090">=None</font>, user_id<font color="#909090">=None</font>, screen_name<font color="#909090">=None</font>, since_id<font color="#909090">=None</font>, max_id<font color="#909090">=None</font>, count<font color="#909090">=None</font>, page<font color="#909090">=None</font>, include_rts<font color="#909090">=None</font>, include_entities<font color="#909090">=None</font>)</dt><dd><tt>Fetch the sequence of public <a href="#Status">Status</a> messages for a single user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated if the user is private.<br>
- <br>
- Args:<br>
- id:<br>
- Specifies the ID or screen name of the user for whom to return<br>
- the user_timeline. [Optional]<br>
- user_id:<br>
- Specfies the ID of the user for whom to return the<br>
- user_timeline. Helpful for disambiguating when a valid user ID<br>
- is also a valid screen name. [Optional]<br>
- screen_name:<br>
- Specfies the screen name of the user for whom to return the<br>
- user_timeline. Helpful for disambiguating when a valid screen<br>
- name is also a user ID. [Optional]<br>
- since_id:<br>
- Returns results with an ID greater than (that is, more recent<br>
- than) the specified ID. There are limits to the number of<br>
- Tweets which can be accessed through the API. If the limit of<br>
- Tweets has occured since the since_id, the since_id will be<br>
- forced to the oldest ID available. [Optional]<br>
- max_id:<br>
- Returns only statuses with an ID less than (that is, older<br>
- than) or equal to the specified ID. [Optional]<br>
- count:<br>
- Specifies the number of statuses to retrieve. May not be<br>
- greater than 200. [Optional]<br>
- page:<br>
- Specifies the page of results to retrieve.<br>
- Note: there are pagination limits. [Optional]<br>
- include_rts:<br>
- If True, the timeline will contain native retweets (if they<br>
- exist) in addition to the standard stream of tweets. [Optional]<br>
- include_entities:<br>
- If True, each tweet will include a node called "entities,".<br>
- This node offers a variety of metadata about the tweet in a<br>
- discreet structure, including: user_mentions, urls, and<br>
- hashtags. [Optional]<br>
- <br>
- Returns:<br>
- A sequence of <a href="#Status">Status</a> instances, one for each message up to count</tt></dd></dl>
- <dl><dt><a name="Api-MaximumHitFrequency"><strong>MaximumHitFrequency</strong></a>(self)</dt><dd><tt>Determines the minimum number of seconds that a program must wait<br>
- before hitting the server again without exceeding the rate_limit<br>
- imposed for the currently authenticated user.<br>
- <br>
- Returns:<br>
- The minimum second interval that a program must use so as to not<br>
- exceed the rate_limit imposed for the user.</tt></dd></dl>
- <dl><dt><a name="Api-PostDirectMessage"><strong>PostDirectMessage</strong></a>(self, user, text)</dt><dd><tt>Post a twitter direct message from the authenticated user<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user: The ID or screen name of the recipient user.<br>
- text: The message text to be posted. Must be less than 140 characters.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#DirectMessage">DirectMessage</a> instance representing the message posted</tt></dd></dl>
- <dl><dt><a name="Api-PostUpdate"><strong>PostUpdate</strong></a>(self, status, in_reply_to_status_id<font color="#909090">=None</font>)</dt><dd><tt>Post a twitter status message from the authenticated user.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- status:<br>
- The message text to be posted.<br>
- Must be less than or equal to 140 characters.<br>
- in_reply_to_status_id:<br>
- The ID of an existing status that the status to be posted is<br>
- in reply to. This implicitly sets the in_reply_to_user_id<br>
- attribute of the resulting status to the user ID of the<br>
- message being replied to. Invalid/missing status IDs will be<br>
- ignored. [Optional]<br>
- Returns:<br>
- A twitter.<a href="#Status">Status</a> instance representing the message posted.</tt></dd></dl>
- <dl><dt><a name="Api-PostUpdates"><strong>PostUpdates</strong></a>(self, status, continuation<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Post one or more twitter status messages from the authenticated user.<br>
- <br>
- Unlike api.PostUpdate, this method will post multiple status updates<br>
- if the message is longer than 140 characters.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- status:<br>
- The message text to be posted.<br>
- May be longer than 140 characters.<br>
- continuation:<br>
- The character string, if any, to be appended to all but the<br>
- last message. Note that Twitter strips trailing '...' strings<br>
- from messages. Consider using the unicode \u2026 character<br>
- (horizontal ellipsis) instead. [Defaults to None]<br>
- **kwargs:<br>
- See api.PostUpdate for a list of accepted parameters.<br>
- <br>
- Returns:<br>
- A of list twitter.<a href="#Status">Status</a> instance representing the messages posted.</tt></dd></dl>
- <dl><dt><a name="Api-SetCache"><strong>SetCache</strong></a>(self, cache)</dt><dd><tt>Override the default cache. Set to None to prevent caching.<br>
- <br>
- Args:<br>
- cache:<br>
- An instance that supports the same API as the twitter._FileCache</tt></dd></dl>
- <dl><dt><a name="Api-SetCacheTimeout"><strong>SetCacheTimeout</strong></a>(self, cache_timeout)</dt><dd><tt>Override the default cache timeout.<br>
- <br>
- Args:<br>
- cache_timeout:<br>
- Time, in seconds, that responses should be reused.</tt></dd></dl>
- <dl><dt><a name="Api-SetCredentials"><strong>SetCredentials</strong></a>(self, consumer_key, consumer_secret, access_token_key<font color="#909090">=None</font>, access_token_secret<font color="#909090">=None</font>)</dt><dd><tt>Set the consumer_key and consumer_secret for this instance<br>
- <br>
- Args:<br>
- consumer_key:<br>
- The consumer_key of the twitter account.<br>
- consumer_secret:<br>
- The consumer_secret for the twitter account.<br>
- access_token_key:<br>
- The oAuth access token key value you retrieved<br>
- from running get_access_token.py.<br>
- access_token_secret:<br>
- The oAuth access token's secret, also retrieved<br>
- from the get_access_token.py run.</tt></dd></dl>
- <dl><dt><a name="Api-SetSource"><strong>SetSource</strong></a>(self, source)</dt><dd><tt>Suggest the "from source" value to be displayed on the Twitter web site.<br>
- <br>
- The value of the 'source' parameter must be first recognized by<br>
- the Twitter server. New source values are authorized on a case by<br>
- case basis by the Twitter development team.<br>
- <br>
- Args:<br>
- source:<br>
- The source name as a string. Will be sent to the server as<br>
- the 'source' parameter.</tt></dd></dl>
- <dl><dt><a name="Api-SetUrllib"><strong>SetUrllib</strong></a>(self, urllib)</dt><dd><tt>Override the default urllib implementation.<br>
- <br>
- Args:<br>
- urllib:<br>
- An instance that supports the same API as the urllib2 module</tt></dd></dl>
- <dl><dt><a name="Api-SetUserAgent"><strong>SetUserAgent</strong></a>(self, user_agent)</dt><dd><tt>Override the default user agent<br>
- <br>
- Args:<br>
- user_agent:<br>
- A string that should be send to the server as the <a href="#User">User</a>-agent</tt></dd></dl>
- <dl><dt><a name="Api-SetXTwitterHeaders"><strong>SetXTwitterHeaders</strong></a>(self, client, url, version)</dt><dd><tt>Set the X-Twitter HTTP headers that will be sent to the server.<br>
- <br>
- Args:<br>
- client:<br>
- The client name as a string. Will be sent to the server as<br>
- the 'X-Twitter-Client' header.<br>
- url:<br>
- The URL of the meta.xml as a string. Will be sent to the server<br>
- as the 'X-Twitter-Client-URL' header.<br>
- version:<br>
- The client version as a string. Will be sent to the server<br>
- as the 'X-Twitter-Client-Version' header.</tt></dd></dl>
- <dl><dt><a name="Api-UsersLookup"><strong>UsersLookup</strong></a>(self, user_id<font color="#909090">=None</font>, screen_name<font color="#909090">=None</font>, users<font color="#909090">=None</font>)</dt><dd><tt>Fetch extended information for the specified users.<br>
- <br>
- Users may be specified either as lists of either user_ids,<br>
- screen_names, or twitter.<a href="#User">User</a> objects. The list of users that<br>
- are queried is the union of all specified parameters.<br>
- <br>
- The twitter.<a href="#Api">Api</a> instance must be authenticated.<br>
- <br>
- Args:<br>
- user_id:<br>
- A list of user_ids to retrieve extended information.<br>
- [Optional]<br>
- screen_name:<br>
- A list of screen_names to retrieve extended information.<br>
- [Optional]<br>
- users:<br>
- A list of twitter.<a href="#User">User</a> objects to retrieve extended information.<br>
- [Optional]<br>
- <br>
- Returns:<br>
- A list of twitter.<a href="#User">User</a> objects for the requested users</tt></dd></dl>
- <dl><dt><a name="Api-VerifyCredentials"><strong>VerifyCredentials</strong></a>(self)</dt><dd><tt>Returns a twitter.<a href="#User">User</a> instance if the authenticating user is valid.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#User">User</a> instance representing that user if the<br>
- credentials are valid, None otherwise.</tt></dd></dl>
- <dl><dt><a name="Api-__init__"><strong>__init__</strong></a>(self, consumer_key<font color="#909090">=None</font>, consumer_secret<font color="#909090">=None</font>, access_token_key<font color="#909090">=None</font>, access_token_secret<font color="#909090">=None</font>, input_encoding<font color="#909090">=None</font>, request_headers<font color="#909090">=None</font>, cache<font color="#909090">=<object object at 0x1001da0a0></font>, shortner<font color="#909090">=None</font>, base_url<font color="#909090">=None</font>, use_gzip_compression<font color="#909090">=False</font>, debugHTTP<font color="#909090">=False</font>)</dt><dd><tt>Instantiate a new twitter.<a href="#Api">Api</a> <a href="__builtin__.html#object">object</a>.<br>
- <br>
- Args:<br>
- consumer_key:<br>
- Your Twitter user's consumer_key.<br>
- consumer_secret:<br>
- Your Twitter user's consumer_secret.<br>
- access_token_key:<br>
- The oAuth access token key value you retrieved<br>
- from running get_access_token.py.<br>
- access_token_secret:<br>
- The oAuth access token's secret, also retrieved<br>
- from the get_access_token.py run.<br>
- input_encoding:<br>
- The encoding used to encode input strings. [Optional]<br>
- request_header:<br>
- A dictionary of additional HTTP request headers. [Optional]<br>
- cache:<br>
- The cache instance to use. Defaults to DEFAULT_CACHE.<br>
- Use None to disable caching. [Optional]<br>
- shortner:<br>
- The shortner instance to use. Defaults to None.<br>
- See shorten_url.py for an example shortner. [Optional]<br>
- base_url:<br>
- The base URL to use to contact the Twitter API.<br>
- Defaults to https://twitter.com. [Optional]<br>
- use_gzip_compression:<br>
- Set to True to tell enable gzip compression for any call<br>
- made to Twitter. Defaults to False. [Optional]<br>
- debugHTTP:<br>
- Set to True to enable debug output from urllib2 when performing<br>
- any HTTP requests. Defaults to False. [Optional]</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <hr>
- Data and other attributes defined here:<br>
- <dl><dt><strong>DEFAULT_CACHE_TIMEOUT</strong> = 60</dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="DirectMessage">class <strong>DirectMessage</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class representing the <a href="#DirectMessage">DirectMessage</a> structure used by the twitter API.<br>
- <br>
- The <a href="#DirectMessage">DirectMessage</a> structure exposes the following properties:<br>
- <br>
- direct_message.id<br>
- direct_message.created_at<br>
- direct_message.created_at_in_seconds # read only<br>
- direct_message.sender_id<br>
- direct_message.sender_screen_name<br>
- direct_message.recipient_id<br>
- direct_message.recipient_screen_name<br>
- direct_message.text<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="DirectMessage-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>A dict representation of this twitter.<a href="#DirectMessage">DirectMessage</a> instance.<br>
- <br>
- The return value uses the same key names as the JSON representation.<br>
- <br>
- Return:<br>
- A dict representing this twitter.<a href="#DirectMessage">DirectMessage</a> instance</tt></dd></dl>
- <dl><dt><a name="DirectMessage-AsJsonString"><strong>AsJsonString</strong></a>(self)</dt><dd><tt>A JSON string representation of this twitter.<a href="#DirectMessage">DirectMessage</a> instance.<br>
- <br>
- Returns:<br>
- A JSON string representation of this twitter.<a href="#DirectMessage">DirectMessage</a> instance</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetCreatedAt"><strong>GetCreatedAt</strong></a>(self)</dt><dd><tt>Get the time this direct message was posted.<br>
- <br>
- Returns:<br>
- The time this direct message was posted</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetCreatedAtInSeconds"><strong>GetCreatedAtInSeconds</strong></a>(self)</dt><dd><tt>Get the time this direct message was posted, in seconds since the epoch.<br>
- <br>
- Returns:<br>
- The time this direct message was posted, in seconds since the epoch.</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetId"><strong>GetId</strong></a>(self)</dt><dd><tt>Get the unique id of this direct message.<br>
- <br>
- Returns:<br>
- The unique id of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetRecipientId"><strong>GetRecipientId</strong></a>(self)</dt><dd><tt>Get the unique recipient id of this direct message.<br>
- <br>
- Returns:<br>
- The unique recipient id of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetRecipientScreenName"><strong>GetRecipientScreenName</strong></a>(self)</dt><dd><tt>Get the unique recipient screen name of this direct message.<br>
- <br>
- Returns:<br>
- The unique recipient screen name of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetSenderId"><strong>GetSenderId</strong></a>(self)</dt><dd><tt>Get the unique sender id of this direct message.<br>
- <br>
- Returns:<br>
- The unique sender id of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetSenderScreenName"><strong>GetSenderScreenName</strong></a>(self)</dt><dd><tt>Get the unique sender screen name of this direct message.<br>
- <br>
- Returns:<br>
- The unique sender screen name of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-GetText"><strong>GetText</strong></a>(self)</dt><dd><tt>Get the text of this direct message.<br>
- <br>
- Returns:<br>
- The text of this direct message.</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetCreatedAt"><strong>SetCreatedAt</strong></a>(self, created_at)</dt><dd><tt>Set the time this direct message was posted.<br>
- <br>
- Args:<br>
- created_at:<br>
- The time this direct message was created</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetId"><strong>SetId</strong></a>(self, id)</dt><dd><tt>Set the unique id of this direct message.<br>
- <br>
- Args:<br>
- id:<br>
- The unique id of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetRecipientId"><strong>SetRecipientId</strong></a>(self, recipient_id)</dt><dd><tt>Set the unique recipient id of this direct message.<br>
- <br>
- Args:<br>
- recipient_id:<br>
- The unique recipient id of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetRecipientScreenName"><strong>SetRecipientScreenName</strong></a>(self, recipient_screen_name)</dt><dd><tt>Set the unique recipient screen name of this direct message.<br>
- <br>
- Args:<br>
- recipient_screen_name:<br>
- The unique recipient screen name of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetSenderId"><strong>SetSenderId</strong></a>(self, sender_id)</dt><dd><tt>Set the unique sender id of this direct message.<br>
- <br>
- Args:<br>
- sender_id:<br>
- The unique sender id of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetSenderScreenName"><strong>SetSenderScreenName</strong></a>(self, sender_screen_name)</dt><dd><tt>Set the unique sender screen name of this direct message.<br>
- <br>
- Args:<br>
- sender_screen_name:<br>
- The unique sender screen name of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-SetText"><strong>SetText</strong></a>(self, text)</dt><dd><tt>Set the text of this direct message.<br>
- <br>
- Args:<br>
- text:<br>
- The text of this direct message</tt></dd></dl>
- <dl><dt><a name="DirectMessage-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="DirectMessage-__init__"><strong>__init__</strong></a>(self, id<font color="#909090">=None</font>, created_at<font color="#909090">=None</font>, sender_id<font color="#909090">=None</font>, sender_screen_name<font color="#909090">=None</font>, recipient_id<font color="#909090">=None</font>, recipient_screen_name<font color="#909090">=None</font>, text<font color="#909090">=None</font>)</dt><dd><tt>An <a href="__builtin__.html#object">object</a> to hold a Twitter direct message.<br>
- <br>
- This class is normally instantiated by the twitter.<a href="#Api">Api</a> class and<br>
- returned in a sequence.<br>
- <br>
- Note: Dates are posted in the form "Sat Jan 27 04:17:38 +0000 2007"<br>
- <br>
- Args:<br>
- id:<br>
- The unique id of this direct message. [Optional]<br>
- created_at:<br>
- The time this direct message was posted. [Optional]<br>
- sender_id:<br>
- The id of the twitter user that sent this message. [Optional]<br>
- sender_screen_name:<br>
- The name of the twitter user that sent this message. [Optional]<br>
- recipient_id:<br>
- The id of the twitter that received this message. [Optional]<br>
- recipient_screen_name:<br>
- The name of the twitter that received this message. [Optional]<br>
- text:<br>
- The text of this direct message. [Optional]</tt></dd></dl>
- <dl><dt><a name="DirectMessage-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="DirectMessage-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>A string representation of this twitter.<a href="#DirectMessage">DirectMessage</a> instance.<br>
- <br>
- The return value is the same as the JSON string representation.<br>
- <br>
- Returns:<br>
- A string representation of this twitter.<a href="#DirectMessage">DirectMessage</a> instance.</tt></dd></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="DirectMessage-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data)</dt><dd><tt>Create a new instance based on a JSON dict.<br>
- <br>
- Args:<br>
- data:<br>
- A JSON dict, as converted from the JSON in the twitter API<br>
- <br>
- Returns:<br>
- A twitter.<a href="#DirectMessage">DirectMessage</a> instance</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>created_at</strong></dt>
- <dd><tt>The time this direct message was posted.</tt></dd>
- </dl>
- <dl><dt><strong>created_at_in_seconds</strong></dt>
- <dd><tt>The time this direct message was posted, in seconds since the epoch</tt></dd>
- </dl>
- <dl><dt><strong>id</strong></dt>
- <dd><tt>The unique id of this direct message.</tt></dd>
- </dl>
- <dl><dt><strong>recipient_id</strong></dt>
- <dd><tt>The unique recipient id of this direct message.</tt></dd>
- </dl>
- <dl><dt><strong>recipient_screen_name</strong></dt>
- <dd><tt>The unique recipient screen name of this direct message.</tt></dd>
- </dl>
- <dl><dt><strong>sender_id</strong></dt>
- <dd><tt>The unique sender id of this direct message.</tt></dd>
- </dl>
- <dl><dt><strong>sender_screen_name</strong></dt>
- <dd><tt>The unique sender screen name of this direct message.</tt></dd>
- </dl>
- <dl><dt><strong>text</strong></dt>
- <dd><tt>The text of this direct message</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="Hashtag">class <strong>Hashtag</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class represeinting a twitter hashtag<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="Hashtag-__init__"><strong>__init__</strong></a>(self, text<font color="#909090">=None</font>)</dt></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="Hashtag-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data)</dt><dd><tt>Create a new instance based on a JSON dict.<br>
- <br>
- Args:<br>
- data:<br>
- A JSON dict, as converted from the JSON in the twitter API<br>
- <br>
- Returns:<br>
- A twitter.<a href="#Hashtag">Hashtag</a> instance</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="List">class <strong>List</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class representing the <a href="#List">List</a> structure used by the twitter API.<br>
- <br>
- The <a href="#List">List</a> structure exposes the following properties:<br>
- <br>
- list.id<br>
- list.name<br>
- list.slug<br>
- list.description<br>
- list.full_name<br>
- list.mode<br>
- list.uri<br>
- list.member_count<br>
- list.subscriber_count<br>
- list.following<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="List-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>A dict representation of this twitter.<a href="#List">List</a> instance.<br>
- <br>
- The return value uses the same key names as the JSON representation.<br>
- <br>
- Return:<br>
- A dict representing this twitter.<a href="#List">List</a> instance</tt></dd></dl>
- <dl><dt><a name="List-AsJsonString"><strong>AsJsonString</strong></a>(self)</dt><dd><tt>A JSON string representation of this twitter.<a href="#List">List</a> instance.<br>
- <br>
- Returns:<br>
- A JSON string representation of this twitter.<a href="#List">List</a> instance</tt></dd></dl>
- <dl><dt><a name="List-GetDescription"><strong>GetDescription</strong></a>(self)</dt><dd><tt>Get the description of this list.<br>
- <br>
- Returns:<br>
- The description of this list</tt></dd></dl>
- <dl><dt><a name="List-GetFollowing"><strong>GetFollowing</strong></a>(self)</dt><dd><tt>Get the following status of this list.<br>
- <br>
- Returns:<br>
- The following status of this list</tt></dd></dl>
- <dl><dt><a name="List-GetFull_name"><strong>GetFull_name</strong></a>(self)</dt><dd><tt>Get the full_name of this list.<br>
- <br>
- Returns:<br>
- The full_name of this list</tt></dd></dl>
- <dl><dt><a name="List-GetId"><strong>GetId</strong></a>(self)</dt><dd><tt>Get the unique id of this list.<br>
- <br>
- Returns:<br>
- The unique id of this list</tt></dd></dl>
- <dl><dt><a name="List-GetMember_count"><strong>GetMember_count</strong></a>(self)</dt><dd><tt>Get the member_count of this list.<br>
- <br>
- Returns:<br>
- The member_count of this list</tt></dd></dl>
- <dl><dt><a name="List-GetMode"><strong>GetMode</strong></a>(self)</dt><dd><tt>Get the mode of this list.<br>
- <br>
- Returns:<br>
- The mode of this list</tt></dd></dl>
- <dl><dt><a name="List-GetName"><strong>GetName</strong></a>(self)</dt><dd><tt>Get the real name of this list.<br>
- <br>
- Returns:<br>
- The real name of this list</tt></dd></dl>
- <dl><dt><a name="List-GetSlug"><strong>GetSlug</strong></a>(self)</dt><dd><tt>Get the slug of this list.<br>
- <br>
- Returns:<br>
- The slug of this list</tt></dd></dl>
- <dl><dt><a name="List-GetSubscriber_count"><strong>GetSubscriber_count</strong></a>(self)</dt><dd><tt>Get the subscriber_count of this list.<br>
- <br>
- Returns:<br>
- The subscriber_count of this list</tt></dd></dl>
- <dl><dt><a name="List-GetUri"><strong>GetUri</strong></a>(self)</dt><dd><tt>Get the uri of this list.<br>
- <br>
- Returns:<br>
- The uri of this list</tt></dd></dl>
- <dl><dt><a name="List-GetUser"><strong>GetUser</strong></a>(self)</dt><dd><tt>Get the user of this list.<br>
- <br>
- Returns:<br>
- The owner of this list</tt></dd></dl>
- <dl><dt><a name="List-SetDescription"><strong>SetDescription</strong></a>(self, description)</dt><dd><tt>Set the description of this list.<br>
- <br>
- Args:<br>
- description:<br>
- The description of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetFollowing"><strong>SetFollowing</strong></a>(self, following)</dt><dd><tt>Set the following status of this list.<br>
- <br>
- Args:<br>
- following:<br>
- The following of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetFull_name"><strong>SetFull_name</strong></a>(self, full_name)</dt><dd><tt>Set the full_name of this list.<br>
- <br>
- Args:<br>
- full_name:<br>
- The full_name of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetId"><strong>SetId</strong></a>(self, id)</dt><dd><tt>Set the unique id of this list.<br>
- <br>
- Args:<br>
- id:<br>
- The unique id of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetMember_count"><strong>SetMember_count</strong></a>(self, member_count)</dt><dd><tt>Set the member_count of this list.<br>
- <br>
- Args:<br>
- member_count:<br>
- The member_count of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetMode"><strong>SetMode</strong></a>(self, mode)</dt><dd><tt>Set the mode of this list.<br>
- <br>
- Args:<br>
- mode:<br>
- The mode of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetName"><strong>SetName</strong></a>(self, name)</dt><dd><tt>Set the real name of this list.<br>
- <br>
- Args:<br>
- name:<br>
- The real name of this list</tt></dd></dl>
- <dl><dt><a name="List-SetSlug"><strong>SetSlug</strong></a>(self, slug)</dt><dd><tt>Set the slug of this list.<br>
- <br>
- Args:<br>
- slug:<br>
- The slug of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetSubscriber_count"><strong>SetSubscriber_count</strong></a>(self, subscriber_count)</dt><dd><tt>Set the subscriber_count of this list.<br>
- <br>
- Args:<br>
- subscriber_count:<br>
- The subscriber_count of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetUri"><strong>SetUri</strong></a>(self, uri)</dt><dd><tt>Set the uri of this list.<br>
- <br>
- Args:<br>
- uri:<br>
- The uri of this list.</tt></dd></dl>
- <dl><dt><a name="List-SetUser"><strong>SetUser</strong></a>(self, user)</dt><dd><tt>Set the user of this list.<br>
- <br>
- Args:<br>
- user:<br>
- The owner of this list.</tt></dd></dl>
- <dl><dt><a name="List-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="List-__init__"><strong>__init__</strong></a>(self, id<font color="#909090">=None</font>, name<font color="#909090">=None</font>, slug<font color="#909090">=None</font>, description<font color="#909090">=None</font>, full_name<font color="#909090">=None</font>, mode<font color="#909090">=None</font>, uri<font color="#909090">=None</font>, member_count<font color="#909090">=None</font>, subscriber_count<font color="#909090">=None</font>, following<font color="#909090">=None</font>, user<font color="#909090">=None</font>)</dt></dl>
- <dl><dt><a name="List-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="List-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>A string representation of this twitter.<a href="#List">List</a> instance.<br>
- <br>
- The return value is the same as the JSON string representation.<br>
- <br>
- Returns:<br>
- A string representation of this twitter.<a href="#List">List</a> instance.</tt></dd></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="List-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data)</dt><dd><tt>Create a new instance based on a JSON dict.<br>
- <br>
- Args:<br>
- data:<br>
- A JSON dict, as converted from the JSON in the twitter API<br>
- <br>
- Returns:<br>
- A twitter.<a href="#List">List</a> instance</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>description</strong></dt>
- <dd><tt>The description of this list.</tt></dd>
- </dl>
- <dl><dt><strong>following</strong></dt>
- <dd><tt>The following status of this list.</tt></dd>
- </dl>
- <dl><dt><strong>full_name</strong></dt>
- <dd><tt>The full_name of this list.</tt></dd>
- </dl>
- <dl><dt><strong>id</strong></dt>
- <dd><tt>The unique id of this list.</tt></dd>
- </dl>
- <dl><dt><strong>member_count</strong></dt>
- <dd><tt>The member_count of this list.</tt></dd>
- </dl>
- <dl><dt><strong>mode</strong></dt>
- <dd><tt>The mode of this list.</tt></dd>
- </dl>
- <dl><dt><strong>name</strong></dt>
- <dd><tt>The real name of this list.</tt></dd>
- </dl>
- <dl><dt><strong>slug</strong></dt>
- <dd><tt>The slug of this list.</tt></dd>
- </dl>
- <dl><dt><strong>subscriber_count</strong></dt>
- <dd><tt>The subscriber_count of this list.</tt></dd>
- </dl>
- <dl><dt><strong>uri</strong></dt>
- <dd><tt>The uri of this list.</tt></dd>
- </dl>
- <dl><dt><strong>user</strong></dt>
- <dd><tt>The owner of this list.</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="Status">class <strong>Status</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class representing the <a href="#Status">Status</a> structure used by the twitter API.<br>
- <br>
- The <a href="#Status">Status</a> structure exposes the following properties:<br>
- <br>
- status.created_at<br>
- status.created_at_in_seconds # read only<br>
- status.favorited<br>
- status.in_reply_to_screen_name<br>
- status.in_reply_to_user_id<br>
- status.in_reply_to_status_id<br>
- status.truncated<br>
- status.source<br>
- status.id<br>
- status.text<br>
- status.location<br>
- status.relative_created_at # read only<br>
- status.user<br>
- status.urls<br>
- status.user_mentions<br>
- status.hashtags<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="Status-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>A dict representation of this twitter.<a href="#Status">Status</a> instance.<br>
- <br>
- The return value uses the same key names as the JSON representation.<br>
- <br>
- Return:<br>
- A dict representing this twitter.<a href="#Status">Status</a> instance</tt></dd></dl>
- <dl><dt><a name="Status-AsJsonString"><strong>AsJsonString</strong></a>(self)</dt><dd><tt>A JSON string representation of this twitter.<a href="#Status">Status</a> instance.<br>
- <br>
- Returns:<br>
- A JSON string representation of this twitter.<a href="#Status">Status</a> instance</tt></dd></dl>
- <dl><dt><a name="Status-GetCreatedAt"><strong>GetCreatedAt</strong></a>(self)</dt><dd><tt>Get the time this status message was posted.<br>
- <br>
- Returns:<br>
- The time this status message was posted</tt></dd></dl>
- <dl><dt><a name="Status-GetCreatedAtInSeconds"><strong>GetCreatedAtInSeconds</strong></a>(self)</dt><dd><tt>Get the time this status message was posted, in seconds since the epoch.<br>
- <br>
- Returns:<br>
- The time this status message was posted, in seconds since the epoch.</tt></dd></dl>
- <dl><dt><a name="Status-GetFavorited"><strong>GetFavorited</strong></a>(self)</dt><dd><tt>Get the favorited setting of this status message.<br>
- <br>
- Returns:<br>
- True if this status message is favorited; False otherwise</tt></dd></dl>
- <dl><dt><a name="Status-GetId"><strong>GetId</strong></a>(self)</dt><dd><tt>Get the unique id of this status message.<br>
- <br>
- Returns:<br>
- The unique id of this status message</tt></dd></dl>
- <dl><dt><a name="Status-GetInReplyToScreenName"><strong>GetInReplyToScreenName</strong></a>(self)</dt></dl>
- <dl><dt><a name="Status-GetInReplyToStatusId"><strong>GetInReplyToStatusId</strong></a>(self)</dt></dl>
- <dl><dt><a name="Status-GetInReplyToUserId"><strong>GetInReplyToUserId</strong></a>(self)</dt></dl>
- <dl><dt><a name="Status-GetLocation"><strong>GetLocation</strong></a>(self)</dt><dd><tt>Get the geolocation associated with this status message<br>
- <br>
- Returns:<br>
- The geolocation string of this status message.</tt></dd></dl>
- <dl><dt><a name="Status-GetNow"><strong>GetNow</strong></a>(self)</dt><dd><tt>Get the wallclock time for this status message.<br>
- <br>
- Used to calculate relative_created_at. Defaults to the time<br>
- the <a href="__builtin__.html#object">object</a> was instantiated.<br>
- <br>
- Returns:<br>
- Whatever the status instance believes the current time to be,<br>
- in seconds since the epoch.</tt></dd></dl>
- <dl><dt><a name="Status-GetRelativeCreatedAt"><strong>GetRelativeCreatedAt</strong></a>(self)</dt><dd><tt>Get a human redable string representing the posting time<br>
- <br>
- Returns:<br>
- A human readable string representing the posting time</tt></dd></dl>
- <dl><dt><a name="Status-GetSource"><strong>GetSource</strong></a>(self)</dt></dl>
- <dl><dt><a name="Status-GetText"><strong>GetText</strong></a>(self)</dt><dd><tt>Get the text of this status message.<br>
- <br>
- Returns:<br>
- The text of this status message.</tt></dd></dl>
- <dl><dt><a name="Status-GetTruncated"><strong>GetTruncated</strong></a>(self)</dt></dl>
- <dl><dt><a name="Status-GetUser"><strong>GetUser</strong></a>(self)</dt><dd><tt>Get a twitter.<a href="#User">User</a> reprenting the entity posting this status message.<br>
- <br>
- Returns:<br>
- A twitter.<a href="#User">User</a> reprenting the entity posting this status message</tt></dd></dl>
- <dl><dt><a name="Status-SetCreatedAt"><strong>SetCreatedAt</strong></a>(self, created_at)</dt><dd><tt>Set the time this status message was posted.<br>
- <br>
- Args:<br>
- created_at:<br>
- The time this status message was created</tt></dd></dl>
- <dl><dt><a name="Status-SetFavorited"><strong>SetFavorited</strong></a>(self, favorited)</dt><dd><tt>Set the favorited state of this status message.<br>
- <br>
- Args:<br>
- favorited:<br>
- boolean True/False favorited state of this status message</tt></dd></dl>
- <dl><dt><a name="Status-SetId"><strong>SetId</strong></a>(self, id)</dt><dd><tt>Set the unique id of this status message.<br>
- <br>
- Args:<br>
- id:<br>
- The unique id of this status message</tt></dd></dl>
- <dl><dt><a name="Status-SetInReplyToScreenName"><strong>SetInReplyToScreenName</strong></a>(self, in_reply_to_screen_name)</dt></dl>
- <dl><dt><a name="Status-SetInReplyToStatusId"><strong>SetInReplyToStatusId</strong></a>(self, in_reply_to_status_id)</dt></dl>
- <dl><dt><a name="Status-SetInReplyToUserId"><strong>SetInReplyToUserId</strong></a>(self, in_reply_to_user_id)</dt></dl>
- <dl><dt><a name="Status-SetLocation"><strong>SetLocation</strong></a>(self, location)</dt><dd><tt>Set the geolocation associated with this status message<br>
- <br>
- Args:<br>
- location:<br>
- The geolocation string of this status message</tt></dd></dl>
- <dl><dt><a name="Status-SetNow"><strong>SetNow</strong></a>(self, now)</dt><dd><tt>Set the wallclock time for this status message.<br>
- <br>
- Used to calculate relative_created_at. Defaults to the time<br>
- the <a href="__builtin__.html#object">object</a> was instantiated.<br>
- <br>
- Args:<br>
- now:<br>
- The wallclock time for this instance.</tt></dd></dl>
- <dl><dt><a name="Status-SetSource"><strong>SetSource</strong></a>(self, source)</dt></dl>
- <dl><dt><a name="Status-SetText"><strong>SetText</strong></a>(self, text)</dt><dd><tt>Set the text of this status message.<br>
- <br>
- Args:<br>
- text:<br>
- The text of this status message</tt></dd></dl>
- <dl><dt><a name="Status-SetTruncated"><strong>SetTruncated</strong></a>(self, truncated)</dt></dl>
- <dl><dt><a name="Status-SetUser"><strong>SetUser</strong></a>(self, user)</dt><dd><tt>Set a twitter.<a href="#User">User</a> reprenting the entity posting this status message.<br>
- <br>
- Args:<br>
- user:<br>
- A twitter.<a href="#User">User</a> reprenting the entity posting this status message</tt></dd></dl>
- <dl><dt><a name="Status-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="Status-__init__"><strong>__init__</strong></a>(self, created_at<font color="#909090">=None</font>, favorited<font color="#909090">=None</font>, id<font color="#909090">=None</font>, text<font color="#909090">=None</font>, location<font color="#909090">=None</font>, user<font color="#909090">=None</font>, in_reply_to_screen_name<font color="#909090">=None</font>, in_reply_to_user_id<font color="#909090">=None</font>, in_reply_to_status_id<font color="#909090">=None</font>, truncated<font color="#909090">=None</font>, source<font color="#909090">=None</font>, now<font color="#909090">=None</font>, urls<font color="#909090">=None</font>, user_mentions<font color="#909090">=None</font>, hashtags<font color="#909090">=None</font>)</dt><dd><tt>An <a href="__builtin__.html#object">object</a> to hold a Twitter status message.<br>
- <br>
- This class is normally instantiated by the twitter.<a href="#Api">Api</a> class and<br>
- returned in a sequence.<br>
- <br>
- Note: Dates are posted in the form "Sat Jan 27 04:17:38 +0000 2007"<br>
- <br>
- Args:<br>
- created_at:<br>
- The time this status message was posted. [Optiona]<br>
- favorited:<br>
- Whether this is a favorite of the authenticated user. [Optiona]<br>
- id:<br>
- The unique id of this status message. [Optiona]<br>
- text:<br>
- The text of this status message. [Optiona]<br>
- location:<br>
- the geolocation string associated with this message. [Optiona]<br>
- relative_created_at:<br>
- A human readable string representing the posting time. [Optiona]<br>
- user:<br>
- A twitter.<a href="#User">User</a> instance representing the person posting the<br>
- message. [Optiona]<br>
- now:<br>
- The current time, if the client choses to set it.<br>
- Defaults to the wall clock time. [Optiona]</tt></dd></dl>
- <dl><dt><a name="Status-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="Status-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>A string representation of this twitter.<a href="#Status">Status</a> instance.<br>
- <br>
- The return value is the same as the JSON string representation.<br>
- <br>
- Returns:<br>
- A string representation of this twitter.<a href="#Status">Status</a> instance.</tt></dd></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="Status-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data)</dt><dd><tt>Create a new instance based on a JSON dict.<br>
- <br>
- Args:<br>
- data: A JSON dict, as converted from the JSON in the twitter API<br>
- Returns:<br>
- A twitter.<a href="#Status">Status</a> instance</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>created_at</strong></dt>
- <dd><tt>The time this status message was posted.</tt></dd>
- </dl>
- <dl><dt><strong>created_at_in_seconds</strong></dt>
- <dd><tt>The time this status message was posted, in seconds since the epoch</tt></dd>
- </dl>
- <dl><dt><strong>favorited</strong></dt>
- <dd><tt>The favorited state of this status message.</tt></dd>
- </dl>
- <dl><dt><strong>id</strong></dt>
- <dd><tt>The unique id of this status message.</tt></dd>
- </dl>
- <dl><dt><strong>in_reply_to_screen_name</strong></dt>
- <dd><tt></tt></dd>
- </dl>
- <dl><dt><strong>in_reply_to_status_id</strong></dt>
- <dd><tt></tt></dd>
- </dl>
- <dl><dt><strong>in_reply_to_user_id</strong></dt>
- <dd><tt></tt></dd>
- </dl>
- <dl><dt><strong>location</strong></dt>
- <dd><tt>The geolocation string of this status message</tt></dd>
- </dl>
- <dl><dt><strong>now</strong></dt>
- <dd><tt>The wallclock time for this status instance.</tt></dd>
- </dl>
- <dl><dt><strong>relative_created_at</strong></dt>
- <dd><tt>Get a human readable string representing the posting time</tt></dd>
- </dl>
- <dl><dt><strong>source</strong></dt>
- <dd><tt></tt></dd>
- </dl>
- <dl><dt><strong>text</strong></dt>
- <dd><tt>The text of this status message</tt></dd>
- </dl>
- <dl><dt><strong>truncated</strong></dt>
- <dd><tt></tt></dd>
- </dl>
- <dl><dt><strong>user</strong></dt>
- <dd><tt>A twitter.User reprenting the entity posting this status message</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="Trend">class <strong>Trend</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class representing a trending topic<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="Trend-__init__"><strong>__init__</strong></a>(self, name<font color="#909090">=None</font>, query<font color="#909090">=None</font>, timestamp<font color="#909090">=None</font>)</dt></dl>
- <dl><dt><a name="Trend-__str__"><strong>__str__</strong></a>(self)</dt></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="Trend-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data, timestamp<font color="#909090">=None</font>)</dt><dd><tt>Create a new instance based on a JSON dict<br>
- <br>
- Args:<br>
- data:<br>
- A JSON dict<br>
- timestamp:<br>
- Gets set as the timestamp property of the new <a href="__builtin__.html#object">object</a><br>
- <br>
- Returns:<br>
- A twitter.<a href="#Trend">Trend</a> <a href="__builtin__.html#object">object</a></tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="TwitterError">class <strong>TwitterError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>Base class for Twitter errors<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%"><dl><dt>Method resolution order:</dt>
- <dd><a href="twitter.html#TwitterError">TwitterError</a></dd>
- <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
- <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
- <dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
- </dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>message</strong></dt>
- <dd><tt>Returns the first argument used to construct this error.</tt></dd>
- </dl>
- <hr>
- Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
- <dl><dt><a name="TwitterError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
- <hr>
- Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
- <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x100119f80><dd><tt>T.<a href="#TwitterError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
- <hr>
- Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><a name="TwitterError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
- <dl><dt><a name="TwitterError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
- <dl><dt><a name="TwitterError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
- <dl><dt><a name="TwitterError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
- <br>
- Use of negative indices is not supported.</tt></dd></dl>
- <dl><dt><a name="TwitterError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
- <dl><dt><a name="TwitterError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
- <dl><dt><a name="TwitterError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
- <dl><dt><a name="TwitterError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
- <dl><dt><a name="TwitterError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#TwitterError-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
- <dl><dt><a name="TwitterError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
- <hr>
- Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
- <dl><dt><strong>__dict__</strong></dt>
- </dl>
- <dl><dt><strong>args</strong></dt>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="Url">class <strong>Url</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class representing an URL contained in a tweet<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="Url-__init__"><strong>__init__</strong></a>(self, url<font color="#909090">=None</font>, expanded_url<font color="#909090">=None</font>)</dt></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="Url-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data)</dt><dd><tt>Create a new instance based on a JSON dict.<br>
- <br>
- Args:<br>
- data:<br>
- A JSON dict, as converted from the JSON in the twitter API<br>
- <br>
- Returns:<br>
- A twitter.<a href="#Url">Url</a> instance</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- </td></tr></table> <p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#ffc8d8">
- <td colspan=3 valign=bottom> <br>
- <font color="#000000" face="helvetica, arial"><a name="User">class <strong>User</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
-
- <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
- <td colspan=2><tt>A class representing the <a href="#User">User</a> structure used by the twitter API.<br>
- <br>
- The <a href="#User">User</a> structure exposes the following properties:<br>
- <br>
- user.id<br>
- user.name<br>
- user.screen_name<br>
- user.location<br>
- user.description<br>
- user.profile_image_url<br>
- user.profile_background_tile<br>
- user.profile_background_image_url<br>
- user.profile_sidebar_fill_color<br>
- user.profile_background_color<br>
- user.profile_link_color<br>
- user.profile_text_color<br>
- user.protected<br>
- user.utc_offset<br>
- user.time_zone<br>
- user.url<br>
- user.status<br>
- user.statuses_count<br>
- user.followers_count<br>
- user.friends_count<br>
- user.favourites_count<br> </tt></td></tr>
- <tr><td> </td>
- <td width="100%">Methods defined here:<br>
- <dl><dt><a name="User-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>A dict representation of this twitter.<a href="#User">User</a> instance.<br>
- <br>
- The return value uses the same key names as the JSON representation.<br>
- <br>
- Return:<br>
- A dict representing this twitter.<a href="#User">User</a> instance</tt></dd></dl>
- <dl><dt><a name="User-AsJsonString"><strong>AsJsonString</strong></a>(self)</dt><dd><tt>A JSON string representation of this twitter.<a href="#User">User</a> instance.<br>
- <br>
- Returns:<br>
- A JSON string representation of this twitter.<a href="#User">User</a> instance</tt></dd></dl>
- <dl><dt><a name="User-GetDescription"><strong>GetDescription</strong></a>(self)</dt><dd><tt>Get the short text description of this user.<br>
- <br>
- Returns:<br>
- The short text description of this user</tt></dd></dl>
- <dl><dt><a name="User-GetFavouritesCount"><strong>GetFavouritesCount</strong></a>(self)</dt><dd><tt>Get the number of favourites for this user.<br>
- <br>
- Returns:<br>
- The number of favourites for this user.</tt></dd></dl>
- <dl><dt><a name="User-GetFollowersCount"><strong>GetFollowersCount</strong></a>(self)</dt><dd><tt>Get the follower count for this user.<br>
- <br>
- Returns:<br>
- The number of users following this user.</tt></dd></dl>
- <dl><dt><a name="User-GetFriendsCount"><strong>GetFriendsCount</strong></a>(self)</dt><dd><tt>Get the friend count for this user.<br>
- <br>
- Returns:<br>
- The number of users this user has befriended.</tt></dd></dl>
- <dl><dt><a name="User-GetId"><strong>GetId</strong></a>(self)</dt><dd><tt>Get the unique id of this user.<br>
- <br>
- Returns:<br>
- The unique id of this user</tt></dd></dl>
- <dl><dt><a name="User-GetLocation"><strong>GetLocation</strong></a>(self)</dt><dd><tt>Get the geographic location of this user.<br>
- <br>
- Returns:<br>
- The geographic location of this user</tt></dd></dl>
- <dl><dt><a name="User-GetName"><strong>GetName</strong></a>(self)</dt><dd><tt>Get the real name of this user.<br>
- <br>
- Returns:<br>
- The real name of this user</tt></dd></dl>
- <dl><dt><a name="User-GetProfileBackgroundColor"><strong>GetProfileBackgroundColor</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-GetProfileBackgroundImageUrl"><strong>GetProfileBackgroundImageUrl</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-GetProfileBackgroundTile"><strong>GetProfileBackgroundTile</strong></a>(self)</dt><dd><tt>Boolean for whether to tile the profile background image.<br>
- <br>
- Returns:<br>
- True if the background is to be tiled, False if not, None if unset.</tt></dd></dl>
- <dl><dt><a name="User-GetProfileImageUrl"><strong>GetProfileImageUrl</strong></a>(self)</dt><dd><tt>Get the url of the thumbnail of this user.<br>
- <br>
- Returns:<br>
- The url of the thumbnail of this user</tt></dd></dl>
- <dl><dt><a name="User-GetProfileLinkColor"><strong>GetProfileLinkColor</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-GetProfileSidebarFillColor"><strong>GetProfileSidebarFillColor</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-GetProfileTextColor"><strong>GetProfileTextColor</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-GetProtected"><strong>GetProtected</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-GetScreenName"><strong>GetScreenName</strong></a>(self)</dt><dd><tt>Get the short twitter name of this user.<br>
- <br>
- Returns:<br>
- The short twitter name of this user</tt></dd></dl>
- <dl><dt><a name="User-GetStatus"><strong>GetStatus</strong></a>(self)</dt><dd><tt>Get the latest twitter.<a href="#Status">Status</a> of this user.<br>
- <br>
- Returns:<br>
- The latest twitter.<a href="#Status">Status</a> of this user</tt></dd></dl>
- <dl><dt><a name="User-GetStatusesCount"><strong>GetStatusesCount</strong></a>(self)</dt><dd><tt>Get the number of status updates for this user.<br>
- <br>
- Returns:<br>
- The number of status updates for this user.</tt></dd></dl>
- <dl><dt><a name="User-GetTimeZone"><strong>GetTimeZone</strong></a>(self)</dt><dd><tt>Returns the current time zone string for the user.<br>
- <br>
- Returns:<br>
- The descriptive time zone string for the user.</tt></dd></dl>
- <dl><dt><a name="User-GetUrl"><strong>GetUrl</strong></a>(self)</dt><dd><tt>Get the homepage url of this user.<br>
- <br>
- Returns:<br>
- The homepage url of this user</tt></dd></dl>
- <dl><dt><a name="User-GetUtcOffset"><strong>GetUtcOffset</strong></a>(self)</dt></dl>
- <dl><dt><a name="User-SetDescription"><strong>SetDescription</strong></a>(self, description)</dt><dd><tt>Set the short text description of this user.<br>
- <br>
- Args:<br>
- description: The short text description of this user</tt></dd></dl>
- <dl><dt><a name="User-SetFavouritesCount"><strong>SetFavouritesCount</strong></a>(self, count)</dt><dd><tt>Set the favourite count for this user.<br>
- <br>
- Args:<br>
- count:<br>
- The number of favourites for this user.</tt></dd></dl>
- <dl><dt><a name="User-SetFollowersCount"><strong>SetFollowersCount</strong></a>(self, count)</dt><dd><tt>Set the follower count for this user.<br>
- <br>
- Args:<br>
- count:<br>
- The number of users following this user.</tt></dd></dl>
- <dl><dt><a name="User-SetFriendsCount"><strong>SetFriendsCount</strong></a>(self, count)</dt><dd><tt>Set the friend count for this user.<br>
- <br>
- Args:<br>
- count:<br>
- The number of users this user has befriended.</tt></dd></dl>
- <dl><dt><a name="User-SetId"><strong>SetId</strong></a>(self, id)</dt><dd><tt>Set the unique id of this user.<br>
- <br>
- Args:<br>
- id: The unique id of this user.</tt></dd></dl>
- <dl><dt><a name="User-SetLocation"><strong>SetLocation</strong></a>(self, location)</dt><dd><tt>Set the geographic location of this user.<br>
- <br>
- Args:<br>
- location: The geographic location of this user</tt></dd></dl>
- <dl><dt><a name="User-SetName"><strong>SetName</strong></a>(self, name)</dt><dd><tt>Set the real name of this user.<br>
- <br>
- Args:<br>
- name: The real name of this user</tt></dd></dl>
- <dl><dt><a name="User-SetProfileBackgroundColor"><strong>SetProfileBackgroundColor</strong></a>(self, profile_background_color)</dt></dl>
- <dl><dt><a name="User-SetProfileBackgroundImageUrl"><strong>SetProfileBackgroundImageUrl</strong></a>(self, profile_background_image_url)</dt></dl>
- <dl><dt><a name="User-SetProfileBackgroundTile"><strong>SetProfileBackgroundTile</strong></a>(self, profile_background_tile)</dt><dd><tt>Set the boolean flag for whether to tile the profile background image.<br>
- <br>
- Args:<br>
- profile_background_tile: Boolean flag for whether to tile or not.</tt></dd></dl>
- <dl><dt><a name="User-SetProfileImageUrl"><strong>SetProfileImageUrl</strong></a>(self, profile_image_url)</dt><dd><tt>Set the url of the thumbnail of this user.<br>
- <br>
- Args:<br>
- profile_image_url: The url of the thumbnail of this user</tt></dd></dl>
- <dl><dt><a name="User-SetProfileLinkColor"><strong>SetProfileLinkColor</strong></a>(self, profile_link_color)</dt></dl>
- <dl><dt><a name="User-SetProfileSidebarFillColor"><strong>SetProfileSidebarFillColor</strong></a>(self, profile_sidebar_fill_color)</dt></dl>
- <dl><dt><a name="User-SetProfileTextColor"><strong>SetProfileTextColor</strong></a>(self, profile_text_color)</dt></dl>
- <dl><dt><a name="User-SetProtected"><strong>SetProtected</strong></a>(self, protected)</dt></dl>
- <dl><dt><a name="User-SetScreenName"><strong>SetScreenName</strong></a>(self, screen_name)</dt><dd><tt>Set the short twitter name of this user.<br>
- <br>
- Args:<br>
- screen_name: the short twitter name of this user</tt></dd></dl>
- <dl><dt><a name="User-SetStatus"><strong>SetStatus</strong></a>(self, status)</dt><dd><tt>Set the latest twitter.<a href="#Status">Status</a> of this user.<br>
- <br>
- Args:<br>
- status:<br>
- The latest twitter.<a href="#Status">Status</a> of this user</tt></dd></dl>
- <dl><dt><a name="User-SetStatusesCount"><strong>SetStatusesCount</strong></a>(self, count)</dt><dd><tt>Set the status update count for this user.<br>
- <br>
- Args:<br>
- count:<br>
- The number of updates for this user.</tt></dd></dl>
- <dl><dt><a name="User-SetTimeZone"><strong>SetTimeZone</strong></a>(self, time_zone)</dt><dd><tt>Sets the user's time zone string.<br>
- <br>
- Args:<br>
- time_zone:<br>
- The descriptive time zone to assign for the user.</tt></dd></dl>
- <dl><dt><a name="User-SetUrl"><strong>SetUrl</strong></a>(self, url)</dt><dd><tt>Set the homepage url of this user.<br>
- <br>
- Args:<br>
- url: The homepage url of this user</tt></dd></dl>
- <dl><dt><a name="User-SetUtcOffset"><strong>SetUtcOffset</strong></a>(self, utc_offset)</dt></dl>
- <dl><dt><a name="User-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="User-__init__"><strong>__init__</strong></a>(self, id<font color="#909090">=None</font>, name<font color="#909090">=None</font>, screen_name<font color="#909090">=None</font>, location<font color="#909090">=None</font>, description<font color="#909090">=None</font>, profile_image_url<font color="#909090">=None</font>, profile_background_tile<font color="#909090">=None</font>, profile_background_image_url<font color="#909090">=None</font>, profile_sidebar_fill_color<font color="#909090">=None</font>, profile_background_color<font color="#909090">=None</font>, profile_link_color<font color="#909090">=None</font>, profile_text_color<font color="#909090">=None</font>, protected<font color="#909090">=None</font>, utc_offset<font color="#909090">=None</font>, time_zone<font color="#909090">=None</font>, followers_count<font color="#909090">=None</font>, friends_count<font color="#909090">=None</font>, statuses_count<font color="#909090">=None</font>, favourites_count<font color="#909090">=None</font>, url<font color="#909090">=None</font>, status<font color="#909090">=None</font>)</dt></dl>
- <dl><dt><a name="User-__ne__"><strong>__ne__</strong></a>(self, other)</dt></dl>
- <dl><dt><a name="User-__str__"><strong>__str__</strong></a>(self)</dt><dd><tt>A string representation of this twitter.<a href="#User">User</a> instance.<br>
- <br>
- The return value is the same as the JSON string representation.<br>
- <br>
- Returns:<br>
- A string representation of this twitter.<a href="#User">User</a> instance.</tt></dd></dl>
- <hr>
- Static methods defined here:<br>
- <dl><dt><a name="User-NewFromJsonDict"><strong>NewFromJsonDict</strong></a>(data)</dt><dd><tt>Create a new instance based on a JSON dict.<br>
- <br>
- Args:<br>
- data:<br>
- A JSON dict, as converted from the JSON in the twitter API<br>
- <br>
- Returns:<br>
- A twitter.<a href="#User">User</a> instance</tt></dd></dl>
- <hr>
- Data descriptors defined here:<br>
- <dl><dt><strong>__dict__</strong></dt>
- <dd><tt>dictionary for instance variables (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>__weakref__</strong></dt>
- <dd><tt>list of weak references to the object (if defined)</tt></dd>
- </dl>
- <dl><dt><strong>description</strong></dt>
- <dd><tt>The short text description of this user.</tt></dd>
- </dl>
- <dl><dt><strong>favourites_count</strong></dt>
- <dd><tt>The number of favourites for this user.</tt></dd>
- </dl>
- <dl><dt><strong>followers_count</strong></dt>
- <dd><tt>The number of users following this user.</tt></dd>
- </dl>
- <dl><dt><strong>friends_count</strong></dt>
- <dd><tt>The number of friends for this user.</tt></dd>
- </dl>
- <dl><dt><strong>id</strong></dt>
- <dd><tt>The unique id of this user.</tt></dd>
- </dl>
- <dl><dt><strong>location</strong></dt>
- <dd><tt>The geographic location of this user.</tt></dd>
- </dl>
- <dl><dt><strong>name</strong></dt>
- <dd><tt>The real name of this user.</tt></dd>
- </dl>
- <dl><dt><strong>profile_background_color</strong></dt>
- </dl>
- <dl><dt><strong>profile_background_image_url</strong></dt>
- <dd><tt>The url of the profile background of this user.</tt></dd>
- </dl>
- <dl><dt><strong>profile_background_tile</strong></dt>
- <dd><tt>Boolean for whether to tile the background image.</tt></dd>
- </dl>
- <dl><dt><strong>profile_image_url</strong></dt>
- <dd><tt>The url of the thumbnail of this user.</tt></dd>
- </dl>
- <dl><dt><strong>profile_link_color</strong></dt>
- </dl>
- <dl><dt><strong>profile_sidebar_fill_color</strong></dt>
- </dl>
- <dl><dt><strong>profile_text_color</strong></dt>
- </dl>
- <dl><dt><strong>protected</strong></dt>
- </dl>
- <dl><dt><strong>screen_name</strong></dt>
- <dd><tt>The short twitter name of this user.</tt></dd>
- </dl>
- <dl><dt><strong>status</strong></dt>
- <dd><tt>The latest twitter.Status of this user.</tt></dd>
- </dl>
- <dl><dt><strong>statuses_count</strong></dt>
- <dd><tt>The number of updates for this user.</tt></dd>
- </dl>
- <dl><dt><strong>time_zone</strong></dt>
- <dd><tt>Returns the current time zone string for the user.<br>
- <br>
- Returns:<br>
- The descriptive time zone string for the user.</tt></dd>
- </dl>
- <dl><dt><strong>url</strong></dt>
- <dd><tt>The homepage url of this user.</tt></dd>
- </dl>
- <dl><dt><strong>utc_offset</strong></dt>
- </dl>
- </td></tr></table></td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#eeaa77">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
-
- <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
- <td width="100%"><dl><dt><a name="-md5"><strong>md5</strong></a> = openssl_md5(...)</dt><dd><tt>Returns a md5 hash <a href="__builtin__.html#object">object</a>; optionally initialized with a string</tt></dd></dl>
- </td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#55aa55">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
-
- <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
- <td width="100%"><strong>ACCESS_TOKEN_URL</strong> = 'https://api.twitter.com/oauth/access_token'<br>
- <strong>AUTHORIZATION_URL</strong> = 'https://api.twitter.com/oauth/authorize'<br>
- <strong>CHARACTER_LIMIT</strong> = 140<br>
- <strong>DEFAULT_CACHE</strong> = <object object at 0x1001da0a0><br>
- <strong>REQUEST_TOKEN_URL</strong> = 'https://api.twitter.com/oauth/request_token'<br>
- <strong>SIGNIN_URL</strong> = 'https://api.twitter.com/oauth/authenticate'<br>
- <strong>__author__</strong> = 'python-twitter@googlegroups.com'<br>
- <strong>__version__</strong> = '0.8'</td></tr></table><p>
- <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
- <tr bgcolor="#7799ee">
- <td colspan=3 valign=bottom> <br>
- <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
-
- <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
- <td width="100%">python-twitter@googlegroups.com</td></tr></table>
- </body></html>