mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 14:06:07 +00:00
update api handler
This commit is contained in:
parent
4a95cc962f
commit
c97eb19869
@ -27,6 +27,8 @@ export class ApiHandler {
|
|||||||
|
|
||||||
constructor(options: ApiHandlerOptions) {
|
constructor(options: ApiHandlerOptions) {
|
||||||
this.options = {
|
this.options = {
|
||||||
|
baseUrl: 'api/v10',
|
||||||
|
domain: 'https://discord.com',
|
||||||
...options,
|
...options,
|
||||||
userAgent: DefaultUserAgent,
|
userAgent: DefaultUserAgent,
|
||||||
};
|
};
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
|
import type { MakeRequired } from '../common';
|
||||||
|
|
||||||
export * from './api';
|
export * from './api';
|
||||||
export * from './utils/constants';
|
export * from './utils/constants';
|
||||||
export * from './utils/types';
|
export * from './utils/types';
|
||||||
export { calculateUserDefaultAvatarIndex } from './utils/utils';
|
export { calculateUserDefaultAvatarIndex } from './utils/utils';
|
||||||
|
|
||||||
export interface ApiHandlerOptions {
|
export interface ApiHandlerOptions {
|
||||||
baseUrl: string;
|
baseUrl?: string;
|
||||||
domain: string;
|
domain?: string;
|
||||||
token: string;
|
token: string;
|
||||||
debug?: boolean;
|
debug?: boolean;
|
||||||
agent?: string;
|
agent?: string;
|
||||||
smartBucket?: boolean;
|
smartBucket?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiHandlerInternalOptions extends ApiHandlerOptions {
|
export interface ApiHandlerInternalOptions extends MakeRequired<ApiHandlerOptions, 'baseUrl' | 'domain'> {
|
||||||
userAgent: string;
|
userAgent: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user