25 lines
477 B
JavaScript
Raw Normal View History

2022-09-25 10:13:31 -07:00
import genericProxyHandler from "utils/proxies/generic";
import { asJson } from "utils/api-helpers";
const widget = {
api: "{url}/api/v3/{endpoint}?apikey={key}",
proxyHandler: genericProxyHandler,
mappings: {
2022-09-26 00:35:54 +03:00
series: {
2022-09-25 10:13:31 -07:00
endpoint: "series",
map: (data) => ({
total: asJson(data).length,
}),
},
2022-09-26 00:35:54 +03:00
queue: {
2022-09-25 10:13:31 -07:00
endpoint: "queue",
},
"wanted/missing": {
2022-09-26 00:35:54 +03:00
endpoint: "wanted/missing",
2022-09-25 10:13:31 -07:00
},
2022-09-26 00:35:54 +03:00
},
2022-09-25 10:13:31 -07:00
};
export default widget;