From e68ba98c8fe9b4feceaaca69c3a557a7d218e8b4 Mon Sep 17 00:00:00 2001 From: kf <7kfpun@gmail.com> Date: Tue, 7 Jul 2015 22:16:42 +0800 Subject: [PATCH] missing commas --- docs/usage/advanced_usage.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage/advanced_usage.rst b/docs/usage/advanced_usage.rst index ff61166..6042b25 100644 --- a/docs/usage/advanced_usage.rst +++ b/docs/usage/advanced_usage.rst @@ -16,7 +16,7 @@ Create a Twython instance with your application keys and the users OAuth tokens .. code-block:: python from twython import Twython - twitter = Twython(APP_KEY, APP_SECRET + twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET) Updating Status with Image @@ -68,12 +68,12 @@ That being said, Twython offers a generator for search results and can be access .. code-block:: python from twython import Twython - twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, - OAUTH_TOKEN_SECRET) + twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, + OAUTH_TOKEN_SECRET) - results = twitter.cursor(twitter.search, q='python') - for result in results: - print result + results = twitter.cursor(twitter.search, q='python') + for result in results: + print result Manipulate the Request (headers, proxies, etc.) ----------------------------------------------- @@ -94,8 +94,8 @@ Here is an example of sending custom headers to a Twitter API request: } } - twitter = Twython(APP_KEY, APP_SECRET - OAUTH_TOKEN, OAUTH_TOKEN_SECRET + twitter = Twython(APP_KEY, APP_SECRET, + OAUTH_TOKEN, OAUTH_TOKEN_SECRET, client_args=client_args) Here is an example of sending the request through proxies: @@ -111,8 +111,8 @@ Here is an example of sending the request through proxies: } } - twitter = Twython(APP_KEY, APP_SECRET - OAUTH_TOKEN, OAUTH_TOKEN_SECRET + twitter = Twython(APP_KEY, APP_SECRET, + OAUTH_TOKEN, OAUTH_TOKEN_SECRET, client_args=client_args) or both (and set a timeout variable): @@ -132,8 +132,8 @@ or both (and set a timeout variable): 'timeout': 300, } - twitter = Twython(APP_KEY, APP_SECRET - OAUTH_TOKEN, OAUTH_TOKEN_SECRET + twitter = Twython(APP_KEY, APP_SECRET, + OAUTH_TOKEN, OAUTH_TOKEN_SECRET, client_args=client_args) Access Headers of Previous Call @@ -146,7 +146,7 @@ If you wish to access headers (ex. x-rate-limit-remaining, x-rate-limit-reset, c from twython import Twython - twitter = Twython(APP_KEY, APP_SECRET + twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET) twitter.get_home_timeline()