Skip to content
Snippets Groups Projects
Commit 81289762 authored by syuilo's avatar syuilo
Browse files

rename

parent cb0e275d
No related branches found
No related tags found
No related merge requests found
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<E extends keyof Endpoints>(
public request<E extends keyof Endpoints>(
endpoint: E, data: Endpoints[E]['req'] = {}, token?: string | null | undefined
): Promise<Endpoints[E]['res']> {
const promise = new Promise<Endpoints[E]['res']>((resolve, reject) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment