UNPKG

koishi-plugin-yunzai

Version:
19 lines (18 loc) 498 B
"use strict"; 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;