Exemple #1
0
def get_custom_links():
    functions = [{
        "name": f.documentation_name,
        "href": get_api_root()[:-1] + f.endpoint
    } for name, f in inspect.getmembers(sys.modules[__name__])
                 if inspect.isfunction(f) and hasattr(f, "documentation_name")]

    return json.dumps(functions, cls=SetEncoder), 200, {
        'Content-Type': 'application/json'
    }
Exemple #2
0
def get_tops_last_month(*args, **kwargs):
    return redirect(get_api_root() +
                    "api/custom/watches/tops?date_from=last+month")
Exemple #3
0
def get_tops_forever(*args, **kwargs):
    return redirect(get_api_root() + "api/custom/watches/tops?date_from=1900")
Exemple #4
0
def get_latest_watches_alias2(*args, **kwargs):
    return redirect(get_api_root() +
                    "api/watches/latest?date_from=last+month&limit=-1")
Exemple #5
0
def get_latest_watches_alias1(*args, **kwargs):
    return redirect(get_api_root() +
                    "api/watches/latest?since=last+week&limit=-1")
Exemple #6
0
def get_latest_logs_alias2(*args, **kwargs):
    return redirect(get_api_root() +
                    "api/thumbnails/latest?since=last+month&limit=-1")
Exemple #7
0
def get_positions_thumbnails(*args, **kwargs):
    return redirect(
        get_api_root() +
        "api/custom/positions?row=0&rank=0&limit=9999&date_from=2020/10/01&date_to=2020/10/31&sorted_by=video_id"
    )