Fork Me badge, more docs
[ci skip]
This commit is contained in:
parent
124dc1b969
commit
dd61841481
6 changed files with 33 additions and 9 deletions
8
docs/_static/custom.css
vendored
8
docs/_static/custom.css
vendored
|
|
@ -2,6 +2,12 @@
|
|||
margin-bottom: 30px !important;
|
||||
}
|
||||
|
||||
div.tip {
|
||||
.tip {
|
||||
color: #3a87ad; /* Basicstrap CSS was messed up so override it */
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.collapse .pull-right{
|
||||
margin-right: 115px !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
docs/_themes/basicstrap/layout.html
vendored
2
docs/_themes/basicstrap/layout.html
vendored
|
|
@ -23,6 +23,8 @@
|
|||
{%- set titlesuffix = "" %}
|
||||
{%- endif %}
|
||||
|
||||
<a href="https://github.com/ryanmcgrath/twython" class="visible-desktop hidden-tablet"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
|
||||
|
||||
{%- macro relbar() %}
|
||||
<div class="related navbar {% if (theme_relbar_inverse|tobool) %}navbar-inverse{% endif %}">
|
||||
<div class="navbar-inner">
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ Core Interface
|
|||
|
||||
.. _streaming_interface:
|
||||
|
||||
.. module:: twython.streaming
|
||||
|
||||
Streaming Interface
|
||||
-------------------
|
||||
|
||||
|
|
@ -40,6 +42,6 @@ Streaming Types
|
|||
Exceptions
|
||||
----------
|
||||
|
||||
.. autoexception:: TwythonError
|
||||
.. autoexception:: TwythonAuthError
|
||||
.. autoexception:: TwythonRateLimitError
|
||||
.. autoexception:: twython.TwythonError
|
||||
.. autoexception:: twython.TwythonAuthError
|
||||
.. autoexception:: twython.TwythonRateLimitError
|
||||
|
|
@ -30,7 +30,7 @@ Usage
|
|||
-----
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:maxdepth: 4
|
||||
|
||||
usage/install
|
||||
usage/starting_out
|
||||
|
|
|
|||
|
|
@ -27,4 +27,18 @@ Documentation: https://dev.twitter.com/docs/api/1.1/get/account/verify_credentia
|
|||
photo = open('/path/to/file/image.jpg', 'rb')
|
||||
twitter.update_status_with_media(status='Checkout this cool image!', media=photo)
|
||||
|
||||
Search Generator
|
||||
----------------
|
||||
|
||||
So, if you're pretty into Python, you probably know about `generators <http://docs.python.org/2/tutorial/classes.html#generators>`_
|
||||
|
||||
That being said, Twython offers a generator for search results and can be accessed by using the following code:
|
||||
|
||||
::
|
||||
|
||||
search = twitter.search_gen('python')
|
||||
for result in search:
|
||||
print result
|
||||
|
||||
|
||||
So now you can authenticate, update your status (with or without an image), search Twitter, and a few other things! Good luck!
|
||||
|
|
@ -94,8 +94,8 @@ First, you'll want to import Twython::
|
|||
|
||||
from twython import Twython
|
||||
|
||||
Don't have an OAuth 2 `access_token`?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Obtain an OAuth 2 Access Token
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
|
|
@ -107,8 +107,8 @@ Don't have an OAuth 2 `access_token`?
|
|||
|
||||
# Save ACCESS_TOKEN in a database or something for later use!
|
||||
|
||||
Already have one?
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Use the Access Token
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue