Skip to content

Commit dd61841

Browse files
Fork Me badge, more docs
[ci skip]
1 parent 124dc1b commit dd61841

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

docs/_static/custom.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
margin-bottom: 30px !important;
33
}
44

5-
div.tip {
5+
.tip {
66
color: #3a87ad; /* Basicstrap CSS was messed up so override it */
77
}
8+
9+
@media (min-width: 1200px) {
10+
.collapse .pull-right{
11+
margin-right: 115px !important;
12+
}
13+
}

docs/_themes/basicstrap/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
{%- set titlesuffix = "" %}
2424
{%- endif %}
2525

26+
<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>
27+
2628
{%- macro relbar() %}
2729
<div class="related navbar {% if (theme_relbar_inverse|tobool) %}navbar-inverse{% endif %}">
2830
<div class="navbar-inner">

docs/api.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Core Interface
2121

2222
.. _streaming_interface:
2323

24+
.. module:: twython.streaming
25+
2426
Streaming Interface
2527
-------------------
2628

@@ -40,6 +42,6 @@ Streaming Types
4042
Exceptions
4143
----------
4244

43-
.. autoexception:: TwythonError
44-
.. autoexception:: TwythonAuthError
45-
.. autoexception:: TwythonRateLimitError
45+
.. autoexception:: twython.TwythonError
46+
.. autoexception:: twython.TwythonAuthError
47+
.. autoexception:: twython.TwythonRateLimitError

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Usage
3030
-----
3131

3232
.. toctree::
33-
:maxdepth: 3
33+
:maxdepth: 4
3434

3535
usage/install
3636
usage/starting_out

docs/usage/advanced_usage.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,18 @@ Documentation: https://dev.twitter.com/docs/api/1.1/get/account/verify_credentia
2727
photo = open('/path/to/file/image.jpg', 'rb')
2828
twitter.update_status_with_media(status='Checkout this cool image!', media=photo)
2929

30+
Search Generator
31+
----------------
32+
33+
So, if you're pretty into Python, you probably know about `generators <http://docs.python.org/2/tutorial/classes.html#generators>`_
34+
35+
That being said, Twython offers a generator for search results and can be accessed by using the following code:
36+
37+
::
38+
39+
search = twitter.search_gen('python')
40+
for result in search:
41+
print result
42+
43+
3044
So now you can authenticate, update your status (with or without an image), search Twitter, and a few other things! Good luck!

docs/usage/starting_out.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ First, you'll want to import Twython::
9494

9595
from twython import Twython
9696

97-
Don't have an OAuth 2 `access_token`?
98-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97+
Obtain an OAuth 2 Access Token
98+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9999

100100
::
101101

@@ -107,8 +107,8 @@ Don't have an OAuth 2 `access_token`?
107107

108108
# Save ACCESS_TOKEN in a database or something for later use!
109109

110-
Already have one?
111-
^^^^^^^^^^^^^^^^^
110+
Use the Access Token
111+
^^^^^^^^^^^^^^^^^^^^
112112

113113
::
114114

0 commit comments

Comments
 (0)