MCPcopy Index your code
hub / github.com/MALSync/MALSync / apiCall

Function apiCall

src/pages/Emby/main.ts:257–269  ·  view source on GitHub ↗
(url, apiKey = null, base = null)

Source from the content-addressed store, hash-verified

255
256// Helper
257async function apiCall(url, apiKey = null, base = null) {
258 if (apiKey === null) apiKey = await getApiKey();
259 if (base === null) base = await getBase();
260 let pre;
261 if (url.indexOf('?') !== -1) {
262 pre = '&';
263 } else {
264 pre = '?';
265 }
266 url = `${base + url + pre}api_key=${apiKey}`;
267 con.log('Api Call', url);
268 return api.request.xhr('GET', url);
269}
270
271export const Emby: pageInterface = {
272 name: 'Emby',

Callers 5

checkApiFunction · 0.70
urlChangeFunction · 0.70
serieInfoFunction · 0.70
returnPlayingItemIdFunction · 0.70
testApiFunction · 0.70

Calls 3

xhrMethod · 0.80
getApiKeyFunction · 0.70
getBaseFunction · 0.70

Tested by

no test coverage detected