From dedb42c6df4fca3360efd6ac179422fa0a9eb95f Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Fri, 21 Jun 2013 16:51:12 -0700 Subject: [PATCH] Create gh-pages branch via GitHub --- index.html | 265 +++++++++++++++++++++++++++++++--------------------- params.json | 2 +- 2 files changed, 157 insertions(+), 110 deletions(-) diff --git a/index.html b/index.html index 611ef2e..a25381f 100644 --- a/index.html +++ b/index.html @@ -39,11 +39,20 @@
-

Twython

+

+Twython

-

Twython is a library providing an easy (and up-to-date) way to access Twitter data in Python. Actively maintained and featuring support for both Python 2.6+ and Python 3, it's been battle tested by companies, educational institutions and individuals alike. Try it today!

+

.. image:: https://travis-ci.org/ryanmcgrath/twython.png?branch=master + :target: https://travis-ci.org/ryanmcgrath/twython +.. image:: https://pypip.in/d/twython/badge.png + :target: https://crate.io/packages/twython/ +.. image:: https://coveralls.io/repos/ryanmcgrath/twython/badge.png?branch=master + :target: https://coveralls.io/r/ryanmcgrath/twython?branch=master

-

Features

+

Twython is the premier Python library providing an easy (and up-to-date) way to access Twitter data. Actively maintained and featuring support for Python 2.6+ and Python 3. It's been battle tested by companies, educational institutions and individuals alike. Try it today!

+ +

+Features

-
  • Image Uploading! +
  • Image Uploading:
      -
    • Update user status with an image
    • +
    • Update user status with an image
    • Change user avatar
    • Change user background image
    • Change user banner image
  • +
  • OAuth 2 Application Only (read-only) Support
  • Support for Twitter's Streaming API
  • Seamless Python 3 support!
  • -

    Installation

    +

    +Installation

    -
    (pip install | easy_install) twython
    +

    Install Twython via pip <http://www.pip-installer.org/>_

    + +

    .. code-block:: bash

    + +
    $ pip install twython
     
    -

    ... or, you can clone the repo and install it the old fashioned way

    +

    or, with easy_install <http://pypi.python.org/pypi/setuptools>_

    + +

    .. code-block:: bash

    + +
    $ easy_install twython
    +
    + +

    But, hey... that's up to you <http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install>_.

    + +

    Or, if you want the code that is currently on GitHub

    + +

    .. code-block:: bash

    git clone git://github.com/ryanmcgrath/twython.git
     cd twython
    -sudo python setup.py install
    +python setup.py install
     
    -

    Usage

    +

    +Documentation

    -
    Authorization URL
    +

    Documentation is available at https://twython.readthedocs.org/en/latest/

    -
    from twython import Twython
    +

    +Starting Out

    -t = Twython(app_key, app_secret) +

    First, you'll want to head over to https://dev.twitter.com/apps and register an application!

    -auth_props = t.get_authentication_tokens(callback_url='http://google.com') +

    After you register, grab your applications Consumer Key and Consumer Secret from the application details tab.

    -oauth_token = auth_props['oauth_token'] -oauth_token_secret = auth_props['oauth_token_secret'] +

    The most common type of authentication is Twitter user authentication using OAuth 1. If you're a web app planning to have users sign up with their Twitter account and interact with their timelines, updating their status, and stuff like that this is the authentication for you!

    -print 'Connect to Twitter via: %s' % auth_props['auth_url'] -
    +

    First, you'll want to import Twython

    -

    Be sure you have a URL set up to handle the callback after the user has allowed your app to access their data, the callback can be used for storing their final OAuth Token and OAuth Token Secret in a database for use at a later date.

    +

    .. code-block:: python

    -
    Handling the callback
    +
    from twython import Twython
    +
    -
    from twython import Twython
    +

    Authentication

    -# oauth_token_secret comes from the previous step -# if needed, store that in a session variable or something. -# oauth_verifier and oauth_token from the previous call is now REQUIRED # to pass to get_authorized_tokens +
    
    +Obtain Authorization URL
    +^^^^^^^^^^^^^^^^^^^^^^^^
     
    -# In Django, to get the oauth_verifier and oauth_token from the callback
    -# url querystring, you might do something like this:
    -# oauth_token = request.GET.get('oauth_token')
    -# oauth_verifier = request.GET.get('oauth_verifier')
    +Now, you'll want to create a Twython instance with your ``Consumer Key`` and ``Consumer Secret``
     
    -t = Twython(app_key, app_secret,
    -            oauth_token, oauth_token_secret)
    +    Only pass *callback_url* to *get_authentication_tokens* if your application is a Web Application
     
    -auth_tokens = t.get_authorized_tokens(oauth_verifier)
    -print auth_tokens
    -
    + Desktop and Mobile Applications **do not** require a callback_url -

    Function definitions (i.e. get_home_timeline()) can be found by reading over twython/endpoints.py

    +.. code-block:: python -
    Getting a user home timeline
    + APP_KEY = 'YOUR_APP_KEY' + APP_SECET = 'YOUR_APP_SECRET' -
    from twython import Twython
    +    twitter = Twython(APP_KEY, APP_SECRET)
     
    -# oauth_token and oauth_token_secret are the final tokens produced
    -# from the 'Handling the callback' step
    +    auth = twitter.get_authentication_tokens(callback_url='http://mysite.com/callback')
     
    -t = Twython(app_key, app_secret,
    -            oauth_token, oauth_token_secret)
    +From the ``auth`` variable, save the ``oauth_token`` and ``oauth_token_secret`` for later use (these are not the final auth tokens). In Django or other web frameworks, you might want to store it to a session variable
     
    -# Returns an dict of the user home timeline
    -print t.get_home_timeline()
    -
    +.. code-block:: python -
    Catching exceptions
    + OAUTH_TOKEN = auth['oauth_token'] + OAUTH_TOKEN_SECRET = auth['oauth_token_secret'] -
    -

    Twython offers three Exceptions currently: TwythonError, TwythonAuthError and TwythonRateLimitError

    -
    +Send the user to the authentication url, you can obtain it by accessing -
    from twython import Twython, TwythonAuthError
    +.. code-block:: python
     
    -t = Twython(MY_WRONG_APP_KEY, MY_WRONG_APP_SECRET,
    -            BAD_OAUTH_TOKEN, BAD_OAUTH_TOKEN_SECRET)
    +    auth['auth_url']
     
    -try:
    -    t.verify_credentials()
    -except TwythonAuthError as e:
    -    print e
    -
    +Handling the Callback +^^^^^^^^^^^^^^^^^^^^^ -

    Dynamic function arguments

    + If your application is a Desktop or Mobile Application *oauth_verifier* will be the PIN code + +After they authorize your application to access some of their account details, they'll be redirected to the callback url you specified in ``get_autentication_tokens`` + +You'll want to extract the ``oauth_verifier`` from the url. + +Django example: + +.. code-block:: python + + oauth_verifier = request.GET['oauth_verifier'] + +Now that you have the ``oauth_verifier`` stored to a variable, you'll want to create a new instance of Twython and grab the final user tokens + +.. code-block:: python + + twitter = Twython(APP_KEY, APP_SECRET, + OAUTH_TOKEN, OAUTH_TOKEN_SECRET) + + final_step = twitter.get_authorized_tokens(oauth_verifier) + +Once you have the final user tokens, store them in a database for later use!:: + + OAUTH_TOKEN = final_step['oauth_token'] + OAUTH_TOKEN_SECERT = final_step['oauth_token_secret'] + +For OAuth 2 (Application Only, read-only) authentication, see `our documentation <https://twython.readthedocs.org/en/latest/usage/starting_out.html#oauth-2-application-authentication>`_ + +Dynamic Function Arguments +
    -

    Keyword arguments to functions are mapped to the functions available for each endpoint in the Twitter API docs. Doing this allows us to be incredibly flexible in querying the Twitter API, so changes to the API aren't held up from you using them by this library.

    -

    https://dev.twitter.com/docs/api/1.1/post/statuses/update says it takes "status" amongst other arguments

    -
    +

    +Basic Usage

    -
    from twython import Twython, TwythonAuthError
    +

    Function definitions (i.e. get_home_timeline()) can be found by reading over twython/endpoints.py

    -t = Twython(app_key, app_secret, - oauth_token, oauth_token_secret) +

    Create a Twython instance with your application keys and the users OAuth tokens

    -try: - t.update_status(status='Hey guys!') -except TwythonError as e: - print e -
    +

    .. code-block:: python

    -
    -

    https://dev.twitter.com/docs/api/1.1/get/search/tweets says it takes "q" and "result_type" amongst other arguments

    -
    +
    from twython import Twython
    +twitter = Twython(APP_KEY, APP_SECRET
    +                  OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
    +
    -
    from twython import Twython, TwythonAuthError
    +

    Authenticated Users Home Timeline

    -t = Twython(app_key, app_secret, - oauth_token, oauth_token_secret) +
    
    +Documentation: https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline
     
    -try:
    -    t.search(q='Hey guys!')
    -    t.search(q='Hey guys!', result_type='popular')
    -except TwythonError as e:
    -    print e
    -
    +.. code-block:: python -
    Streaming API
    + twitter.get_home_timeline() -
    from twython import TwythonStreamer
    +Updating Status
    +
    -class MyStreamer(TwythonStreamer): - def on_success(self, data): - print data +

    This method makes use of dynamic arguments, read more about them <https://twython.readthedocs.org/en/latest/usage/starting_out.html#dynamic-function-arguments>_

    - def on_error(self, status_code, data): - print status_code, data +

    Documentation: https://dev.twitter.com/docs/api/1/post/statuses/update

    -# Requires Authentication as of Twitter API v1.1 -stream = MyStreamer(APP_KEY, APP_SECRET, - OAUTH_TOKEN, OAUTH_TOKEN_SECRET) +

    .. code-block:: python

    -stream.statuses.filter(track='twitter') -
    +
    twitter.update_status(status='See how easy using Twython is!')
    +
    -

    Notes

    +

    Searching

    -
      -
    • Twython (as of 2.7.0) now supports ONLY Twitter v1.1 endpoints! Please see the Twitter v1.1 API Documentation to help migrate your API calls!
    • -
    • As of Twython 2.9.1, all method names conform to PEP8 standards. For backwards compatibility, we internally check and catch any calls made using the old (pre 2.9.1) camelCase method syntax. We will continue to support this for the foreseeable future for all old methods (raising a DeprecationWarning where appropriate), but you should update your code if you have the time.
    • -

    Questions, Comments, etc?

    +
    
    +    https://dev.twitter.com/docs/api/1.1/get/search/tweets says it takes "q" and "result_type" amongst other arguments
     
    -

    My hope is that Twython is so simple that you'd never have to ask any questions, but if you feel the need to contact me for this (or other) reasons, you can hit me up at ryan@venodesigns.net.

    +.. code-block:: python -

    Or if I'm to busy to answer, feel free to ping mikeh@ydekproductions.com as well.

    + twitter.search(q='twitter') + twitter.search(q='twitter', result_type='popular') -

    Follow us on Twitter:

    +Advanced Usage +-------------- -

    Want to help?

    +- `Advanced Twython Usage <https://twython.readthedocs.org/en/latest/usage/advanced_usage.html>`_ +- `Streaming with Twython <https://twython.readthedocs.org/en/latest/usage/streaming_api.html>`_ -

    Twython is useful, but ultimately only as useful as the people using it (say that ten times fast!). If you'd like to help, write example code, contribute patches, document things on the wiki, tweet about it. Your help is always appreciated!

    + +Notes +----- + +- Twython 3.0.0 has been injected with 1000mgs of pure awesomeness! OAuth 2 application authentication is now supported. And a *whole lot* more! See the `CHANGELOG <https://github.com/ryanmcgrath/twython/blob/master/HISTORY.rst#300-2013-06-18>`_ for more details! + +Questions, Comments, etc? +------------------------- + +My hope is that Twython is so simple that you'd never *have* to ask any questions, but if you feel the need to contact me for this (or other) reasons, you can hit me up at ryan@venodesigns.net. + +Or if I'm to busy to answer, feel free to ping mikeh@ydekproductions.com as well. + +Follow us on Twitter: + +- `@ryanmcgrath <https://twitter.com/ryanmcgrath>`_ +- `@mikehelmick <https://twitter.com/mikehelmick>`_ + +Want to help? +------------- + +Twython is useful, but ultimately only as useful as the people using it (say that ten times fast!). If you'd like to help, write example code, contribute patches, document things on the wiki, tweet about it. Your help is always appreciated! +
    @@ -242,4 +289,4 @@ sudo python setup.py install - + \ No newline at end of file diff --git a/params.json b/params.json index f2f3ee5..7a0ccda 100644 --- a/params.json +++ b/params.json @@ -1 +1 @@ -{"name":"Twython","tagline":"An actively maintained, pure Python wrapper for the Twitter API. Supports both the normal and streaming Twitter APIs.","body":"Twython\r\n=======\r\n\r\n```Twython``` is a library providing an easy (and up-to-date) way to access Twitter data in Python. Actively maintained and featuring support for both Python 2.6+ and Python 3, it's been battle tested by companies, educational institutions and individuals alike. Try it today!\r\n\r\nFeatures\r\n--------\r\n\r\n* Query data for:\r\n - User information\r\n - Twitter lists\r\n - Timelines\r\n - Direct Messages\r\n - and anything found in [the docs](https://dev.twitter.com/docs/api/1.1)\r\n* Image Uploading!\r\n - **Update user status with an image**\r\n - Change user avatar\r\n - Change user background image\r\n - Change user banner image\r\n* Support for Twitter's Streaming API\r\n* Seamless Python 3 support!\r\n\r\nInstallation\r\n------------\r\n\r\n (pip install | easy_install) twython\r\n\r\n... or, you can clone the repo and install it the old fashioned way\r\n\r\n git clone git://github.com/ryanmcgrath/twython.git\r\n cd twython\r\n sudo python setup.py install\r\n\r\nUsage\r\n-----\r\n\r\n##### Authorization URL\r\n\r\n```python\r\nfrom twython import Twython\r\n\r\nt = Twython(app_key, app_secret)\r\n\r\nauth_props = t.get_authentication_tokens(callback_url='http://google.com')\r\n\r\noauth_token = auth_props['oauth_token']\r\noauth_token_secret = auth_props['oauth_token_secret']\r\n\r\nprint 'Connect to Twitter via: %s' % auth_props['auth_url']\r\n```\r\n\r\nBe sure you have a URL set up to handle the callback after the user has allowed your app to access their data, the callback can be used for storing their final OAuth Token and OAuth Token Secret in a database for use at a later date.\r\n\r\n##### Handling the callback\r\n\r\n```python\r\nfrom twython import Twython\r\n\r\n# oauth_token_secret comes from the previous step\r\n# if needed, store that in a session variable or something.\r\n# oauth_verifier and oauth_token from the previous call is now REQUIRED # to pass to get_authorized_tokens\r\n\r\n# In Django, to get the oauth_verifier and oauth_token from the callback\r\n# url querystring, you might do something like this:\r\n# oauth_token = request.GET.get('oauth_token')\r\n# oauth_verifier = request.GET.get('oauth_verifier')\r\n\r\nt = Twython(app_key, app_secret,\r\n oauth_token, oauth_token_secret)\r\n\r\nauth_tokens = t.get_authorized_tokens(oauth_verifier)\r\nprint auth_tokens\r\n```\r\n\r\n*Function definitions (i.e. get_home_timeline()) can be found by reading over twython/endpoints.py*\r\n\r\n##### Getting a user home timeline\r\n\r\n```python\r\nfrom twython import Twython\r\n\r\n# oauth_token and oauth_token_secret are the final tokens produced\r\n# from the 'Handling the callback' step\r\n\r\nt = Twython(app_key, app_secret,\r\n oauth_token, oauth_token_secret)\r\n\r\n# Returns an dict of the user home timeline\r\nprint t.get_home_timeline()\r\n```\r\n\r\n##### Catching exceptions\r\n> Twython offers three Exceptions currently: TwythonError, TwythonAuthError and TwythonRateLimitError\r\n\r\n```python\r\nfrom twython import Twython, TwythonAuthError\r\n\r\nt = Twython(MY_WRONG_APP_KEY, MY_WRONG_APP_SECRET,\r\n BAD_OAUTH_TOKEN, BAD_OAUTH_TOKEN_SECRET)\r\n\r\ntry:\r\n t.verify_credentials()\r\nexcept TwythonAuthError as e:\r\n print e\r\n```\r\n\r\n#### Dynamic function arguments\r\n> Keyword arguments to functions are mapped to the functions available for each endpoint in the Twitter API docs. Doing this allows us to be incredibly flexible in querying the Twitter API, so changes to the API aren't held up from you using them by this library.\r\n\r\n> https://dev.twitter.com/docs/api/1.1/post/statuses/update says it takes \"status\" amongst other arguments\r\n\r\n```python\r\nfrom twython import Twython, TwythonAuthError\r\n\r\nt = Twython(app_key, app_secret,\r\n oauth_token, oauth_token_secret)\r\n\r\ntry:\r\n t.update_status(status='Hey guys!')\r\nexcept TwythonError as e:\r\n print e\r\n```\r\n\r\n> https://dev.twitter.com/docs/api/1.1/get/search/tweets says it takes \"q\" and \"result_type\" amongst other arguments\r\n\r\n```python\r\nfrom twython import Twython, TwythonAuthError\r\n\r\nt = Twython(app_key, app_secret,\r\n oauth_token, oauth_token_secret)\r\n\r\ntry:\r\n t.search(q='Hey guys!')\r\n t.search(q='Hey guys!', result_type='popular')\r\nexcept TwythonError as e:\r\n print e\r\n```\r\n\r\n##### Streaming API\r\n\r\n```python\r\nfrom twython import TwythonStreamer\r\n\r\nclass MyStreamer(TwythonStreamer):\r\n def on_success(self, data):\r\n print data\r\n\r\n def on_error(self, status_code, data):\r\n print status_code, data\r\n\r\n# Requires Authentication as of Twitter API v1.1\r\nstream = MyStreamer(APP_KEY, APP_SECRET,\r\n OAUTH_TOKEN, OAUTH_TOKEN_SECRET)\r\n\r\nstream.statuses.filter(track='twitter')\r\n```\r\n\r\nNotes\r\n-----\r\n- Twython (as of 2.7.0) now supports ONLY Twitter v1.1 endpoints! Please see the **[Twitter v1.1 API Documentation](https://dev.twitter.com/docs/api/1.1)** to help migrate your API calls!\r\n- As of Twython 2.9.1, all method names conform to PEP8 standards. For backwards compatibility, we internally check and catch any calls made using the old (pre 2.9.1) camelCase method syntax. We will continue to support this for the foreseeable future for all old methods (raising a DeprecationWarning where appropriate), but you should update your code if you have the time.\r\n\r\nQuestions, Comments, etc?\r\n-------------------------\r\nMy hope is that Twython is so simple that you'd never *have* to ask any questions, but if you feel the need to contact me for this (or other) reasons, you can hit me up at ryan@venodesigns.net.\r\n\r\nOr if I'm to busy to answer, feel free to ping mikeh@ydekproductions.com as well.\r\n\r\nFollow us on Twitter:\r\n* **[@ryanmcgrath](http://twitter.com/ryanmcgrath)**\r\n* **[@mikehelmick](http://twitter.com/mikehelmick)**\r\n\r\nWant to help?\r\n-------------\r\nTwython is useful, but ultimately only as useful as the people using it (say that ten times fast!). If you'd like to help, write example code, contribute patches, document things on the wiki, tweet about it. Your help is always appreciated!\r\n","google":"UA-40660943-1","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file +{"name":"Twython","tagline":"An actively maintained, pure Python wrapper for the Twitter API. Supports both the normal and streaming Twitter APIs.","body":"Twython\r\n=======\r\n\r\n\r\n.. image:: https://travis-ci.org/ryanmcgrath/twython.png?branch=master\r\n :target: https://travis-ci.org/ryanmcgrath/twython\r\n.. image:: https://pypip.in/d/twython/badge.png\r\n :target: https://crate.io/packages/twython/\r\n.. image:: https://coveralls.io/repos/ryanmcgrath/twython/badge.png?branch=master\r\n :target: https://coveralls.io/r/ryanmcgrath/twython?branch=master\r\n\r\n``Twython`` is the premier Python library providing an easy (and up-to-date) way to access Twitter data. Actively maintained and featuring support for Python 2.6+ and Python 3. It's been battle tested by companies, educational institutions and individuals alike. Try it today!\r\n\r\nFeatures\r\n--------\r\n\r\n- Query data for:\r\n - User information\r\n - Twitter lists\r\n - Timelines\r\n - Direct Messages\r\n - and anything found in `the docs `_\r\n- Image Uploading:\r\n - Update user status with an image\r\n - Change user avatar\r\n - Change user background image\r\n - Change user banner image\r\n- OAuth 2 Application Only (read-only) Support\r\n- Support for Twitter's Streaming API\r\n- Seamless Python 3 support!\r\n\r\nInstallation\r\n------------\r\n\r\nInstall Twython via `pip `_\r\n\r\n.. code-block:: bash\r\n\r\n $ pip install twython\r\n\r\nor, with `easy_install `_\r\n\r\n.. code-block:: bash\r\n\r\n $ easy_install twython\r\n\r\nBut, hey... `that's up to you `_.\r\n\r\nOr, if you want the code that is currently on GitHub\r\n\r\n.. code-block:: bash\r\n\r\n git clone git://github.com/ryanmcgrath/twython.git\r\n cd twython\r\n python setup.py install\r\n\r\nDocumentation\r\n-------------\r\n\r\nDocumentation is available at https://twython.readthedocs.org/en/latest/\r\n\r\nStarting Out\r\n------------\r\n\r\nFirst, you'll want to head over to https://dev.twitter.com/apps and register an application!\r\n\r\nAfter you register, grab your applications ``Consumer Key`` and ``Consumer Secret`` from the application details tab.\r\n\r\nThe most common type of authentication is Twitter user authentication using OAuth 1. If you're a web app planning to have users sign up with their Twitter account and interact with their timelines, updating their status, and stuff like that this **is** the authentication for you!\r\n\r\nFirst, you'll want to import Twython\r\n\r\n.. code-block:: python\r\n\r\n from twython import Twython\r\n\r\nAuthentication\r\n~~~~~~~~~~~~~~\r\n\r\nObtain Authorization URL\r\n^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nNow, you'll want to create a Twython instance with your ``Consumer Key`` and ``Consumer Secret``\r\n\r\n Only pass *callback_url* to *get_authentication_tokens* if your application is a Web Application\r\n\r\n Desktop and Mobile Applications **do not** require a callback_url\r\n\r\n.. code-block:: python\r\n\r\n APP_KEY = 'YOUR_APP_KEY'\r\n APP_SECET = 'YOUR_APP_SECRET'\r\n\r\n twitter = Twython(APP_KEY, APP_SECRET)\r\n\r\n auth = twitter.get_authentication_tokens(callback_url='http://mysite.com/callback')\r\n\r\nFrom the ``auth`` variable, save the ``oauth_token`` and ``oauth_token_secret`` for later use (these are not the final auth tokens). In Django or other web frameworks, you might want to store it to a session variable\r\n\r\n.. code-block:: python\r\n\r\n OAUTH_TOKEN = auth['oauth_token']\r\n OAUTH_TOKEN_SECRET = auth['oauth_token_secret']\r\n\r\nSend the user to the authentication url, you can obtain it by accessing\r\n\r\n.. code-block:: python\r\n\r\n auth['auth_url']\r\n\r\nHandling the Callback\r\n^^^^^^^^^^^^^^^^^^^^^\r\n\r\n If your application is a Desktop or Mobile Application *oauth_verifier* will be the PIN code\r\n\r\nAfter they authorize your application to access some of their account details, they'll be redirected to the callback url you specified in ``get_autentication_tokens``\r\n\r\nYou'll want to extract the ``oauth_verifier`` from the url.\r\n\r\nDjango example:\r\n\r\n.. code-block:: python\r\n\r\n oauth_verifier = request.GET['oauth_verifier']\r\n\r\nNow that you have the ``oauth_verifier`` stored to a variable, you'll want to create a new instance of Twython and grab the final user tokens\r\n\r\n.. code-block:: python\r\n\r\n twitter = Twython(APP_KEY, APP_SECRET,\r\n OAUTH_TOKEN, OAUTH_TOKEN_SECRET)\r\n\r\n final_step = twitter.get_authorized_tokens(oauth_verifier)\r\n\r\nOnce you have the final user tokens, store them in a database for later use!::\r\n\r\n OAUTH_TOKEN = final_step['oauth_token']\r\n OAUTH_TOKEN_SECERT = final_step['oauth_token_secret']\r\n\r\nFor OAuth 2 (Application Only, read-only) authentication, see `our documentation `_\r\n\r\nDynamic Function Arguments\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nKeyword arguments to functions are mapped to the functions available for each endpoint in the Twitter API docs. Doing this allows us to be incredibly flexible in querying the Twitter API, so changes to the API aren't held up from you using them by this library.\r\n\r\nBasic Usage\r\n-----------\r\n\r\n**Function definitions (i.e. get_home_timeline()) can be found by reading over twython/endpoints.py**\r\n\r\nCreate a Twython instance with your application keys and the users OAuth tokens\r\n\r\n.. code-block:: python\r\n\r\n from twython import Twython\r\n twitter = Twython(APP_KEY, APP_SECRET\r\n OAUTH_TOKEN, OAUTH_TOKEN_SECRET)\r\n\r\nAuthenticated Users Home Timeline\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nDocumentation: https://dev.twitter.com/docs/api/1.1/get/statuses/home_timeline\r\n\r\n.. code-block:: python\r\n\r\n twitter.get_home_timeline()\r\n\r\nUpdating Status\r\n~~~~~~~~~~~~~~~\r\n\r\nThis method makes use of dynamic arguments, `read more about them `_\r\n\r\nDocumentation: https://dev.twitter.com/docs/api/1/post/statuses/update\r\n\r\n.. code-block:: python\r\n\r\n twitter.update_status(status='See how easy using Twython is!')\r\n\r\nSearching\r\n~~~~~~~~~\r\n\r\n https://dev.twitter.com/docs/api/1.1/get/search/tweets says it takes \"q\" and \"result_type\" amongst other arguments\r\n\r\n.. code-block:: python\r\n\r\n twitter.search(q='twitter')\r\n twitter.search(q='twitter', result_type='popular')\r\n\r\nAdvanced Usage\r\n--------------\r\n\r\n- `Advanced Twython Usage `_\r\n- `Streaming with Twython `_\r\n\r\n\r\nNotes\r\n-----\r\n\r\n- Twython 3.0.0 has been injected with 1000mgs of pure awesomeness! OAuth 2 application authentication is now supported. And a *whole lot* more! See the `CHANGELOG `_ for more details!\r\n\r\nQuestions, Comments, etc?\r\n-------------------------\r\n\r\nMy hope is that Twython is so simple that you'd never *have* to ask any questions, but if you feel the need to contact me for this (or other) reasons, you can hit me up at ryan@venodesigns.net.\r\n\r\nOr if I'm to busy to answer, feel free to ping mikeh@ydekproductions.com as well.\r\n\r\nFollow us on Twitter:\r\n\r\n- `@ryanmcgrath `_\r\n- `@mikehelmick `_\r\n\r\nWant to help?\r\n-------------\r\n\r\nTwython is useful, but ultimately only as useful as the people using it (say that ten times fast!). If you'd like to help, write example code, contribute patches, document things on the wiki, tweet about it. Your help is always appreciated!\r\n","google":"UA-40660943-1","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file