Skip to content

Commit fe584d8

Browse files
author
Aaron Gonzales
committed
updating readme
1 parent 1fc73c1 commit fe584d8

File tree

4 files changed

+31
-27
lines changed

4 files changed

+31
-27
lines changed

README.rst

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Python Twitter Search API
22
=========================
33

4-
This library serves as a Python interface to the `Twitter premium and
5-
enterprise search
6-
APIs <https://developer.twitter.com/en/docs/tweets/search/overview/>`__.
7-
It provides a command-line utility and a library usable from within a
4+
This library serves as a Python interface to the various `Twitter
5+
premium and enterprise search
6+
APIs <https://developer.twitter.com/en/products/tweets/search>`__. It
7+
provides a command-line utility and a library usable from within a
88
Python program. It comes with tools for assisting in dynamic generation
99
of search rules and for parsing tweets.
1010

@@ -14,6 +14,8 @@ Pretty docs can be seen
1414
Features
1515
========
1616

17+
- Supports 30-day Search and Full Archive Search (not the standard
18+
Search API).
1719
- Command-line utility is pipeable to other tools (e.g., ``jq``).
1820
- Automatically handles pagination of results with specifiable limits
1921
- Delivers a stream of data to the user for low in-memory requirements
@@ -138,7 +140,7 @@ Environment Variable Overrides
138140
------------------------------
139141

140142
If we set our environment variables, the program will look for them
141-
regardless of a YAML files validity or existence.
143+
regardless of a YAML file's validity or existence.
142144

143145
.. code:: python
144146
@@ -339,7 +341,7 @@ Using the Twitter Search APIs' Python Wrapper
339341
Working with the API within a Python program is straightforward both for
340342
Premium and Enterprise clients.
341343

342-
Well assume that credentials are in the default location,
344+
We'll assume that credentials are in the default location,
343345
``~/.twitter_keys.yaml``.
344346

345347
.. code:: python
@@ -371,7 +373,7 @@ sandbox environment can only have a max of 100 here, so if you get
371373
errors, please check this) not including dates, and defaulting to hourly
372374
counts when using the counts api. Discussing the finer points of
373375
generating search rules is out of scope for these examples; I encourage
374-
you to see the docs to learn the nuances within, but for now lets see
376+
you to see the docs to learn the nuances within, but for now let's see
375377
what a rule looks like.
376378

377379
.. code:: python
@@ -393,23 +395,23 @@ requires less thought and knowledge, and interaction with the
393395
Fast Way
394396
--------
395397

396-
Well use the ``search_args`` variable to power the configuration point
398+
We'll use the ``search_args`` variable to power the configuration point
397399
for the API. The object also takes a valid PowerTrack rule and has
398400
options to cutoff search when hitting limits on both number of Tweets
399401
and API calls.
400402

401-
Well be using the ``collect_results`` function, which has three
403+
We'll be using the ``collect_results`` function, which has three
402404
parameters.
403405

404406
- rule: a valid PowerTrack rule, referenced earlier
405407
- max_results: as the API handles pagination, it will stop collecting
406408
when we get to this number
407-
- result_stream_args: configuration args that weve already specified.
409+
- result_stream_args: configuration args that we've already specified.
408410

409411
For the remaining examples, please change the args to either premium or
410412
enterprise depending on your usage.
411413

412-
Lets see how it goes:
414+
Let's see how it goes:
413415

414416
.. code:: python
415417
@@ -488,8 +490,8 @@ number of Tweet attributes are made available directly, as such:
488490
Twitter for iPhone
489491

490492
Voila, we have some Tweets. For interactive environments and other cases
491-
where you dont care about collecting your data in a single load or
492-
dont need to operate on the stream of Tweets or counts directly, I
493+
where you don't care about collecting your data in a single load or
494+
don't need to operate on the stream of Tweets or counts directly, I
493495
recommend using this convenience function.
494496

495497
Working with the ResultStream
@@ -619,7 +621,7 @@ Our results are pretty straightforward and can be rapidly used.
619621
Dated searches / Full Archive Search
620622
------------------------------------
621623

622-
Lets make a new rule and pass it dates this time.
624+
Let's make a new rule and pass it dates this time.
623625

624626
``gen_rule_payload`` takes dates of the forms ``YYYY-mm-DD`` and
625627
``YYYYmmDD``.

examples/api_example.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Working with the API within a Python program is straightforward both for
33
Premium and Enterprise clients.
44

5-
Well assume that credentials are in the default location,
5+
We'll assume that credentials are in the default location,
66
``~/.twitter_keys.yaml``.
77

88
.. code:: ipython3
@@ -34,7 +34,7 @@ sandbox environment can only have a max of 100 here, so if you get
3434
errors, please check this) not including dates, and defaulting to hourly
3535
counts when using the counts api. Discussing the finer points of
3636
generating search rules is out of scope for these examples; I encourage
37-
you to see the docs to learn the nuances within, but for now lets see
37+
you to see the docs to learn the nuances within, but for now let's see
3838
what a rule looks like.
3939

4040
.. code:: ipython3
@@ -58,23 +58,24 @@ requires less thought and knowledge, and interaction with the
5858
Fast Way
5959
--------
6060

61-
Well use the ``search_args`` variable to power the configuration point
61+
We'll use the ``search_args`` variable to power the configuration point
6262
for the API. The object also takes a valid PowerTrack rule and has
6363
options to cutoff search when hitting limits on both number of Tweets
6464
and API calls.
6565

66-
Well be using the ``collect_results`` function, which has three
66+
We'll be using the ``collect_results`` function, which has three
6767
parameters.
6868

6969
- rule: a valid PowerTrack rule, referenced earlier
70-
- max_results: as the API handles pagination, it will stop collecting
70+
- max\_results: as the API handles pagination, it will stop collecting
7171
when we get to this number
72-
- result_stream_args: configuration args that we’ve already specified.
72+
- result\_stream\_args: configuration args that we've already
73+
specified.
7374

7475
For the remaining examples, please change the args to either premium or
7576
enterprise depending on your usage.
7677

77-
Lets see how it goes:
78+
Let's see how it goes:
7879

7980
.. code:: ipython3
8081
@@ -160,8 +161,8 @@ number of Tweet attributes are made available directly, as such:
160161

161162

162163
Voila, we have some Tweets. For interactive environments and other cases
163-
where you dont care about collecting your data in a single load or
164-
dont need to operate on the stream of Tweets or counts directly, I
164+
where you don't care about collecting your data in a single load or
165+
don't need to operate on the stream of Tweets or counts directly, I
165166
recommend using this convenience function.
166167

167168
Working with the ResultStream
@@ -300,7 +301,7 @@ Our results are pretty straightforward and can be rapidly used.
300301
Dated searches / Full Archive Search
301302
------------------------------------
302303

303-
Lets make a new rule and pass it dates this time.
304+
Let's make a new rule and pass it dates this time.
304305

305306
``gen_rule_payload`` takes dates of the forms ``YYYY-mm-DD`` and
306307
``YYYYmmDD``.

examples/base_readme.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Python Twitter Search API
22
=========================
33

4-
This library serves as a Python interface to the `Twitter premium and enterprise search APIs
5-
<https://developer.twitter.com/en/docs/tweets/search/overview/>`_.
4+
This library serves as a Python interface to the various `Twitter premium and enterprise search APIs
5+
<https://developer.twitter.com/en/products/tweets/search>`_.
66
It provides a command-line utility and a library usable from within a Python program. It
77
comes with tools for assisting in dynamic generation of search rules and for
88
parsing tweets.
@@ -13,6 +13,7 @@ Pretty docs can be seen `here <https://twitterdev.github.io/search-tweets-python
1313
Features
1414
========
1515

16+
- Supports 30-day Search and Full Archive Search (not the standard Search API).
1617
- Command-line utility is pipeable to other tools (e.g., ``jq``).
1718
- Automatically handles pagination of results with specifiable limits
1819
- Delivers a stream of data to the user for low in-memory requirements

examples/credential_handling.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Environment Variable Overrides
106106
------------------------------
107107

108108
If we set our environment variables, the program will look for them
109-
regardless of a YAML files validity or existence.
109+
regardless of a YAML file's validity or existence.
110110

111111
.. code:: ipython3
112112

0 commit comments

Comments
 (0)