mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 06:48:47 +00:00
Add AdGuard, Bazarr, and Coin Market Cap widgets
- Allow setting HTTP method in widget.js - Allow sending allow listed query params to proxy
This commit is contained in:
parent
f999f4a467
commit
03fa2f86d7
10 changed files with 251 additions and 9 deletions
|
@ -2,8 +2,6 @@
|
|||
// emby: `{url}/emby/{endpoint}?api_key={key}`,
|
||||
// jellyfin: `{url}/emby/{endpoint}?api_key={key}`,
|
||||
// pihole: `{url}/admin/{endpoint}`,
|
||||
// radarr: `{url}/api/v3/{endpoint}?apikey={key}`,
|
||||
// sonarr: `{url}/api/v3/{endpoint}?apikey={key}`,
|
||||
// speedtest: `{url}/api/{endpoint}`,
|
||||
// tautulli: `{url}/api/v2?apikey={key}&cmd={endpoint}`,
|
||||
// traefik: `{url}/api/{endpoint}`,
|
||||
|
@ -12,18 +10,14 @@
|
|||
// transmission: `{url}/transmission/rpc`,
|
||||
// qbittorrent: `{url}/api/v2/{endpoint}`,
|
||||
// jellyseerr: `{url}/api/v1/{endpoint}`,
|
||||
// overseerr: `{url}/api/v1/{endpoint}`,
|
||||
// ombi: `{url}/api/v1/{endpoint}`,
|
||||
// npm: `{url}/api/{endpoint}`,
|
||||
// lidarr: `{url}/api/v1/{endpoint}?apikey={key}`,
|
||||
// readarr: `{url}/api/v1/{endpoint}?apikey={key}`,
|
||||
// bazarr: `{url}/api/{endpoint}/wanted?apikey={key}`,
|
||||
// sabnzbd: `{url}/api/?apikey={key}&output=json&mode={endpoint}`,
|
||||
// coinmarketcap: `https://pro-api.coinmarketcap.com/{endpoint}`,
|
||||
// gotify: `{url}/{endpoint}`,
|
||||
// prowlarr: `{url}/api/v1/{endpoint}`,
|
||||
// jackett: `{url}/api/v2.0/{endpoint}?apikey={key}&configured=true`,
|
||||
// adguard: `{url}/control/{endpoint}`,
|
||||
// strelaysrv: `{url}/{endpoint}`,
|
||||
// mastodon: `{url}/api/v1/{endpoint}`,
|
||||
// };
|
||||
|
@ -38,13 +32,16 @@ export function formatApiCall(url, args) {
|
|||
return url.replace(find, replace);
|
||||
}
|
||||
|
||||
export function formatProxyUrl(widget, endpoint) {
|
||||
export function formatProxyUrl(widget, endpoint, endpointParams) {
|
||||
const params = new URLSearchParams({
|
||||
type: widget.type,
|
||||
group: widget.service_group,
|
||||
service: widget.service_name,
|
||||
endpoint,
|
||||
});
|
||||
if (endpointParams) {
|
||||
params.append("params", JSON.stringify(endpointParams));
|
||||
}
|
||||
return `/api/services/proxy?${params.toString()}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue