feat(web): add duration efficiency rankings and about payload
This commit is contained in:
1 parent
519fc39fca
commit
5a656d42a8
4 files changed
+308
-10
No files matched your search
@@ -324,7 +324,7 @@ border-color:#3a2c22;color:#f3e9dc}button{background:#e9b97c;color:#2a1a10}}
|
||||
scope = _param(query, "scope", "video")
|
||||
if scope == "up":
|
||||
self._send_json(HTTPStatus.OK, queries.list_ups(
|
||||
sort=_param(query, "sort", "avg_views"),
|
||||
sort=_param(query, "sort", "efficiency"),
|
||||
within_days=_optional_int(query, "within_days"),
|
||||
q=_optional_str(query, "q"),
|
||||
min_videos=_int_param(query, "min_videos", 1, 1, 10000),
|
||||
@@ -354,7 +354,7 @@ border-color:#3a2c22;color:#f3e9dc}button{background:#e9b97c;color:#2a1a10}}
|
||||
return
|
||||
if path == "/api/ups":
|
||||
self._send_json(HTTPStatus.OK, queries.list_ups(
|
||||
sort=_param(query, "sort", "avg_views"),
|
||||
sort=_param(query, "sort", "efficiency"),
|
||||
within_days=_optional_int(query, "within_days"),
|
||||
q=_optional_str(query, "q"),
|
||||
min_videos=_int_param(query, "min_videos", 1, 1, 10000),
|
||||
@@ -385,6 +385,9 @@ border-color:#3a2c22;color:#f3e9dc}button{background:#e9b97c;color:#2a1a10}}
|
||||
recent_days=_int_param(query, "recent_days", 14, 1, 3650),
|
||||
))
|
||||
return
|
||||
if path == "/api/about":
|
||||
self._send_json(HTTPStatus.OK, queries.about())
|
||||
return
|
||||
if path == "/api/candidates":
|
||||
self._send_json(HTTPStatus.OK, queries.candidates())
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user