mirror of
https://github.com/krateng/maloja.git
synced 2025-07-09 03:04:07 -04:00
Add a top album function to the native API
This commit is contained in:
parent
e328ae48f3
commit
ec77ee6091
@ -400,7 +400,23 @@ def get_top_tracks_external(**keys):
|
|||||||
"list":results
|
"list":results
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@api.get("top/albums")
|
||||||
|
@catch_exceptions
|
||||||
|
@add_common_args_to_docstring(limitkeys=True,delimitkeys=True)
|
||||||
|
def get_top_albums_external(**keys):
|
||||||
|
"""Returns respective number 1 albums in specified time frames
|
||||||
|
|
||||||
|
:return: list (List)
|
||||||
|
:rtype: Dictionary"""
|
||||||
|
_, k_time, k_internal, _, _ = uri_to_internal(keys)
|
||||||
|
ckeys = {**k_time, **k_internal}
|
||||||
|
|
||||||
|
results = database.get_top_albums(**ckeys)
|
||||||
|
|
||||||
|
return {
|
||||||
|
"status":"ok",
|
||||||
|
"list":results
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@api.get("artistinfo")
|
@api.get("artistinfo")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user