Skip to content

Commit 402f583

Browse files
author
Aaron Gonzales
committed
documentation updates
1 parent 16073af commit 402f583

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

searchtweets/api_utils.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import json
1616

1717
__all__ = ["gen_rule_payload", "gen_params_from_config", "load_credentials",
18-
"infer_endpoint",
18+
"infer_endpoint", "convert_utc_time",
1919
"validate_count_api", "GNIP_RESP_CODES", "change_to_count_endpoint"]
2020

2121
logger = logging.getLogger(__name__)
@@ -240,13 +240,14 @@ def load_credentials(filename=None, account_type=None):
240240
default '~/.twitter_keys.yaml'
241241
account_type (str): pass your account type, "premium" or "enterprise"
242242
243-
Returns: dict of your access credentials.
243+
Returns:
244+
dict of your access credentials.
244245
245246
Example:
246-
>>> from searchtweets.api_utils import load_credentials
247-
>>> search_args = load_credentials(account_type="premium")
248-
>>> search_args.keys()
249-
dict_keys(['bearer_token', 'endpoint'])
247+
>>> from searchtweets.api_utils import load_credentials
248+
>>> search_args = load_credentials(account_type="premium")
249+
>>> search_args.keys()
250+
dict_keys(['bearer_token', 'endpoint'])
250251
251252
"""
252253
if account_type is None or account_type not in {"premium", "enterprise"}:

searchtweets/result_stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def make_session(username=None, password=None, bearer_token=None):
3333
Args:
3434
username (str): username for the session
3535
password (str): password for the user
36-
bearer_token (str): token for the session for freemium.
36+
bearer_token (str): token for a premium API user.
3737
"""
3838

3939
if password is None and bearer_token is None:
@@ -229,7 +229,7 @@ def init_session(self):
229229

230230
def check_counts(self):
231231
"""
232-
Disables tweet parsing if the count api is used.
232+
Disables tweet parsing if the count API is used.
233233
"""
234234
if "counts" in re.split("[/.]", self.endpoint):
235235
logger.info("disabling tweet parsing due to counts api usage")

0 commit comments

Comments
 (0)