From 1fd1d244a739b2b3bbbdde21d3570edbc2d6cacb Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 9 Apr 2014 06:25:55 -0400 Subject: [PATCH] Update 'Getting Started' page --- docs/getting_started.rst | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 295ee9c..895679b 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -18,21 +18,19 @@ Hello Tweepy .. code-block :: python import tweepy + + auth = tweepy.OAuthHandler(consumer_key, consumer_secret) + auth.set_access_token(access_token, access_token_secret) + + api = tweepy.API(auth) - public_tweets = tweepy.api.public_timeline() + public_tweets = api.home_timeline() for tweet in public_tweets: print tweet.text -This example will download the public timeline tweets and print each -one of their texts to the console. tweepy.api in the above code -snippet is an unauthenticated instance of the tweepy API class. The -API class contains all the methods for access the Twitter API. By -unauthenticated means there is no user associated with this -instance. So you may only do unauthenticated API calls with this -instance. For example the following would fail:: - - tweepy.api.update_status('will not work!') - +This example will download your home timeline tweets and print each +one of their texts to the console. Twitter requires all requests to +use OAuth for authentication. The :ref:`auth_tutorial` goes into more details about authentication. API -- 2.25.1