From 08c5226ae2d4df67d73259f01b3a058bf1c85c0a Mon Sep 17 00:00:00 2001 From: kakakaya Date: Tue, 6 Mar 2018 03:00:37 +0900 Subject: [PATCH] Add api.timeline_public method --- toot/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toot/api.py b/toot/api.py index 479fc36..59622c2 100644 --- a/toot/api.py +++ b/toot/api.py @@ -91,6 +91,10 @@ def timeline_home(app, user): return http.get(app, user, '/api/v1/timelines/home').json() +def timeline_public(app, user, local=False): + return http.get(app, user, '/api/v1/timelines/public', {'local': 'true' if local else 'false'}).json() + + def get_next_path(headers): """Given timeline response headers, returns the path to the next batch""" links = headers.get('Link', '')