1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-23 06:25:26 +00:00

Add api.timeline_public method

This commit is contained in:
kakakaya 2018-03-06 03:00:37 +09:00 committed by Ivan Habunek
parent 09a138ba27
commit 08c5226ae2
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -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', '')