koishi-plugin-yunzai
Version:
a yunzai adapter for koishi
19 lines (18 loc) • 498 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnkaAdapter = void 0;
class EnkaAdapter {
constructor() {
this.baseURL = new URL('https://enka.network/');
}
setup(uid, proxyAgent) {
this.uid = uid;
this.baseURL.pathname = `/json/${uid}`;
if (proxyAgent)
this.baseURL = proxyAgent;
}
async findPanel() {
return await fetch(this.baseURL.href, {});
}
}
exports.EnkaAdapter = EnkaAdapter;