mirror of
https://github.com/benphelps/homepage.git
synced 2025-12-20 04:39:44 +01:00
25 lines
494 B
JavaScript
25 lines
494 B
JavaScript
|
|
import genericProxyHandler from "utils/proxies/generic";
|
||
|
|
import { asJson } from "utils/api-helpers";
|
||
|
|
|
||
|
|
const widget = {
|
||
|
|
api: "{url}/api/{endpoint}/wanted?apikey={key}",
|
||
|
|
proxyHandler: genericProxyHandler,
|
||
|
|
|
||
|
|
mappings: {
|
||
|
|
"movies": {
|
||
|
|
endpoint: "movies",
|
||
|
|
map: (data) => ({
|
||
|
|
total: asJson(data).total,
|
||
|
|
}),
|
||
|
|
},
|
||
|
|
"episodes": {
|
||
|
|
endpoint: "episodes",
|
||
|
|
map: (data) => ({
|
||
|
|
total: asJson(data).total,
|
||
|
|
}),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default widget;
|