MCPcopy Create free account
hub / github.com/MALSync/MALSync / getData

Method getData

src/_provider/Simkl/metaOverview.ts:58–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 }
57
58 private async getData() {
59 let de;
60 if (Number.isNaN(this.malId)) {
61 de = { simkl: this.simklId };
62 } else {
63 de = { mal: this.malId };
64 }
65
66 if (Number.isNaN(this.simklId)) {
67 const el = await this.call('https://api.simkl.com/search/id', de, true);
68 if (!el?.length) throw new NotFoundError(`simklId: ${this.simklId}`);
69 this.simklId = el[0].ids.simkl;
70 }
71
72 return this.call(`https://api.simkl.com/anime/${this.simklId}`, { extended: 'full' }, true);
73 }
74
75 private title(data) {
76 const { title } = data;

Callers 1

_initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected