Class HTTPClient

Hierarchy

  • HTTPClient

Constructors

Properties

Methods

Constructors

Properties

client: AxiosInstance

Param

base url of the Misskey server

Param

access token of the user

host: string
token: string

Methods

  • Type Parameters

    • E extends keyof Endpoints

    • P extends NoParams | {
          cw: null | string;
          localOnly: boolean;
          poll: null | {
              choices: string[];
              expiredAfter: null | number;
              expiresAt: null | number;
              multiple: boolean;
          };
          reactionAcceptance: null | "likeOnly" | "nonSensitiveOnly" | "likeOnlyForRemote" | "nonSensitiveOnlyForRemote";
          renoteId: null | string;
          replyId: null | string;
          text: null | string;
          visibility: NoteVisibility;
          visibleUserIds: string[];
      } | {
          host: null | string;
          userId: null | string;
          userIds?: string[];
          username: null | string;
      } | {
          excludeNsfw: boolean;
          fileType?: string[];
          includeMyRenotes: boolean;
          includeReplies: boolean;
          limit: number;
          sinceDate: number;
          sinceId: null | string;
          untilDate: number;
          untilId: null | string;
          userId: string;
          withFiles: boolean;
      } | {
          limit: null | number;
          noteId: string;
          offset: number;
          sinceId: null | string;
          type: null | string;
          untilId: null | string;
      } | {
          noteId: string;
          reaction: string;
      } | {
          noteId: string;
          reaction: string;
      } | {
          userId: string;
      } | {
          forwarded: boolean;
          limit: number;
          reporterOrigin: "conbined" | "local" | "remote";
          state: null | string;
          targetUserOrigin: "conbined" | "local" | "remote";
      }

    Parameters

    • endpoint: E

      Misskey API endpoint Endpoints

    • requestParams: P

      request params

    Returns Promise<Endpoints[E]["res"]>

Generated using TypeDoc