def _anon_timeline_generator(instance, path, params=None): while path: url = "https://{}{}".format(instance, path) response = http.anon_get(url, params) yield response.json() path = _get_next_path(response.headers)
def get_instance(domain, scheme="https"): url = "{}://{}/api/v1/instance".format(scheme, domain) return http.anon_get(url).json()
def get_instance(domain): url = "http://{}/api/v1/instance".format(domain) return http.anon_get(url).json()