From a3ebd96e058f87a4d17a9fe8b1867f8f66e02ea2 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Wed, 13 Feb 2019 14:19:27 +0100 Subject: [PATCH] Mark function as private --- toot/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toot/api.py b/toot/api.py index b9865c4..c6fde67 100644 --- a/toot/api.py +++ b/toot/api.py @@ -151,7 +151,7 @@ def context(app, user, status_id): return http.get(app, user, url).json() -def get_next_path(headers): +def _get_next_path(headers): """Given timeline response headers, returns the path to the next batch""" links = headers.get('Link', '') matches = re.match('<([^>]+)>; rel="next"', links) @@ -164,7 +164,7 @@ def _timeline_generator(app, user, path, params=None): while path: response = http.get(app, user, path, params) yield response.json() - path = get_next_path(response.headers) + path = _get_next_path(response.headers) def _anon_timeline_generator(instance, path, params=None): @@ -172,7 +172,7 @@ def _anon_timeline_generator(instance, path, params=None): url = "https://{}{}".format(instance, path) response = http.anon_get(url, params) yield response.json() - path = get_next_path(response.headers) + path = _get_next_path(response.headers) def home_timeline_generator(app, user, limit=20):