Fork Me badge, more docs

[ci skip]
This commit is contained in:
Mike Helmick 2013-06-07 20:54:52 -04:00
parent 124dc1b969
commit dd61841481
6 changed files with 33 additions and 9 deletions

View file

@ -2,6 +2,12 @@
margin-bottom: 30px !important; margin-bottom: 30px !important;
} }
div.tip { .tip {
color: #3a87ad; /* Basicstrap CSS was messed up so override it */ color: #3a87ad; /* Basicstrap CSS was messed up so override it */
} }
@media (min-width: 1200px) {
.collapse .pull-right{
margin-right: 115px !important;
}
}

View file

@ -23,6 +23,8 @@
{%- set titlesuffix = "" %} {%- set titlesuffix = "" %}
{%- endif %} {%- 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() %} {%- macro relbar() %}
<div class="related navbar {% if (theme_relbar_inverse|tobool) %}navbar-inverse{% endif %}"> <div class="related navbar {% if (theme_relbar_inverse|tobool) %}navbar-inverse{% endif %}">
<div class="navbar-inner"> <div class="navbar-inner">

View file

@ -21,6 +21,8 @@ Core Interface
.. _streaming_interface: .. _streaming_interface:
.. module:: twython.streaming
Streaming Interface Streaming Interface
------------------- -------------------
@ -40,6 +42,6 @@ Streaming Types
Exceptions Exceptions
---------- ----------
.. autoexception:: TwythonError .. autoexception:: twython.TwythonError
.. autoexception:: TwythonAuthError .. autoexception:: twython.TwythonAuthError
.. autoexception:: TwythonRateLimitError .. autoexception:: twython.TwythonRateLimitError

View file

@ -30,7 +30,7 @@ Usage
----- -----
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 4
usage/install usage/install
usage/starting_out usage/starting_out

View file

@ -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') photo = open('/path/to/file/image.jpg', 'rb')
twitter.update_status_with_media(status='Checkout this cool image!', media=photo) 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! So now you can authenticate, update your status (with or without an image), search Twitter, and a few other things! Good luck!

View file

@ -94,8 +94,8 @@ First, you'll want to import Twython::
from twython 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! # Save ACCESS_TOKEN in a database or something for later use!
Already have one? Use the Access Token
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
:: ::