Ejemplo n.º 1
0
def get_changefiles():
    # api key is optional here, is just sends back urls that populate with it
    api_key = request.args.get("api_key", "YOUR_API_KEY")
    interval = request.args.get("interval", "week")

    if interval == "week":
        feed = WEEKLY_FEED
    elif interval == "day":
        feed = DAILY_FEED
    else:
        abort_json(401, 'option "interval" must be one of ["day", "week"]')

    resp = get_changefile_dicts(api_key, feed=feed)
    return jsonify({"list": resp})
Ejemplo n.º 2
0
def get_daily_changefiles():
    # api key is optional here, is just sends back urls that populate with it
    api_key = request.args.get("api_key", "YOUR_API_KEY")
    resp = get_changefile_dicts(api_key, feed=DAILY_FEED)
    return jsonify({"list": resp})
Ejemplo n.º 3
0
def get_changefiles():
    # api key is optional here, is just sends back urls that populate with it
    api_key = request.args.get("api_key", "YOUR_API_KEY")
    resp = get_changefile_dicts(api_key)
    return jsonify({"list": resp})