diff --git a/src/api.ts b/src/api.ts index b24d090c7..49b3eea19 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,16 +1,16 @@ import { Endpoints } from './endpoints'; -export class MisskeyClient { +export class APIClient { public i: { token: string; } | null = null; private apiUrl: string; constructor(opts: { - apiUrl: MisskeyClient['apiUrl']; + apiUrl: APIClient['apiUrl']; }) { this.apiUrl = opts.apiUrl; } - public api( + public request( endpoint: E, data: Endpoints[E]['req'] = {}, token?: string | null | undefined ): Promise { const promise = new Promise((resolve, reject) => {