Fix grammatical mistakes in cursor tutorial
authorHarmon <Harmon758@gmail.com>
Tue, 4 Dec 2018 15:51:53 +0000 (09:51 -0600)
committerGitHub <noreply@github.com>
Tue, 4 Dec 2018 15:51:53 +0000 (09:51 -0600)
docs/cursor_tutorial.rst

index a4e6e442b32252d1dc5791dc23931f896b823612..57a461208f3aa5fb6fc42e30ecf18aa5fb619cc7 100644 (file)
@@ -11,16 +11,16 @@ Introduction
 
 We use pagination a lot in Twitter API development. Iterating through
 timelines, user lists, direct messages, etc. In order to perform
-pagination we must supply a page/cursor parameter with each of our
+pagination, we must supply a page/cursor parameter with each of our
 requests. The problem here is this requires a lot of boiler plate code
 just to manage the pagination loop. To help make pagination easier and
-require less code Tweepy has the Cursor object.
+require less code, Tweepy has the Cursor object.
 
 Old way vs Cursor way
 ---------------------
 
 First let's demonstrate iterating the statuses in the authenticated
-user's timeline. Here is how we would do it the "old way" before
+user's timeline. Here is how we would do it the "old way" before the
 Cursor object was introduced::
 
    page = 1
@@ -35,8 +35,8 @@ Cursor object was introduced::
            break
        page += 1  # next page
 
-As you can see we must manage the "page" parameter manually in our
-pagination loop. Now here is the version of the code using Cursor
+As you can see, we must manage the "page" parameter manually in our
+pagination loop. Now here is the version of the code using the Cursor
 object::
 
    for status in tweepy.Cursor(api.user_timeline).items():
@@ -44,7 +44,7 @@ object::
        process_status(status)
 
 Now that looks much better! Cursor handles all the pagination work for
-us behind the scene so our code can now focus entirely on processing
+us behind the scenes, so our code can now focus entirely on processing
 the results.
 
 Passing parameters into the API method
@@ -62,14 +62,14 @@ Cursor constructor method::
 
    tweepy.Cursor(api.user_timeline, id="twitter")
 
-Now Cursor will pass the parameter into the method for us when ever it
+Now Cursor will pass the parameter into the method for us whenever it
 makes a request.
 
 Items or Pages
 --------------
 
-So far we have just demonstrated pagination iterating per an
-item. What if instead you want to process per page of results? You
+So far we have just demonstrated pagination iterating per
+item. What if instead you want to process per page of results? You
 would use the pages() method::
 
    for page in tweepy.Cursor(api.user_timeline).pages():
@@ -96,10 +96,10 @@ What if you only want n items or pages returned? You pass into the items() or pa
 Include Tweets > 140 Characters
 -------------------------------
 
-Since twitter increased the maximum characters allowed in a tweet from 140 to 280, you may notice that tweets greater than 140 characters are truncated with a ...
-If you want your results to include the full text of the long tweets make these simple changes:
+Since twitter increased the maximum number of characters allowed in a tweet from 140 to 280, you may notice that tweets greater than 140 characters are truncated with ...
+If you want your results to include the full text of the long tweets, make these simple changes:
 - add the argument tweet_mode='extended' to your Cursor object call
-- change your usages of .text to .full_text
+- change your usage of .text to .full_text
 
 .. code-block :: python