Exemplo n.º 1
0
def carousel_maker(title, typestr, metric, shows, limit=10, offset=0, sort="desc"):
    result = stats_list(metric, shows, limit=limit, offset=offset, sort=sort)
    posters = get_profiles(result, typestr)
    return {
        "title": title,
        "type": typestr,
        "posters": posters
    }
Exemplo n.º 2
0
def carousel_maker(title,
                   typestr,
                   metric,
                   shows,
                   limit=10,
                   offset=0,
                   sort="desc"):
    result = stats_list(metric, shows, limit=limit, offset=offset, sort=sort)
    posters = get_profiles(result, typestr)
    return {"title": title, "type": typestr, "posters": posters}
Exemplo n.º 3
0
def carousel():
    limit = int(request.args.get('limit', 10))
    offset = int(request.args.get('offset', 0))
    depth = request.args.get('depth', None)
    sort = request.args.get('sort', 'desc')
    profile = request.args.get('profile', None)

    metric = request.args.get('metric', None) # what we're looking at
    show = request.args.get('show', '')
    shows = show.split(",")

    data = stats_list(metric, shows, limit=limit, offset=offset, sort=sort, depth=depth, listify=True)
    items = get_profiles(data, profile)

    return json.dumps(items)
Exemplo n.º 4
0
def carousel():
    limit = int(request.args.get('limit', 10))
    offset = int(request.args.get('offset', 0))
    depth = request.args.get('depth', None)
    sort = request.args.get('sort', 'desc')
    profile = request.args.get('profile', None)

    metric = request.args.get('metric', None) # what we're looking at
    show = request.args.get('show', '')
    shows = show.split(",")

    data = stats_list(metric, shows, limit=limit, offset=offset, sort=sort, depth=depth, listify=True)
    items = get_profiles(data, profile)
    
    return json.dumps(items)