Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Indexable

[x: string]: any

Index

Constructors

Methods

Constructors

  • new default(options?: { rateLimitPrevent: boolean; requestsPerMinutes: number }): default
  • Anilist parameters

    Parameters

    • options: { rateLimitPrevent: boolean; requestsPerMinutes: number } = ...

      Options related to ratelimits

      • rateLimitPrevent: boolean

        Decided if requests gets tracked and prevented by the library or the api

      • requestsPerMinutes: number

    Returns default

Methods

  • search(name: string, type: string, page?: number, resultsCount?: number, isAdult?: boolean): Promise<{ data: any[] }>
  • Search for a media.

    Parameters

    • name: string

      The name of the media to search for

    • type: string

      The type, can be either anime or manga

    • page: number = 1

      Which page to show

    • resultsCount: number = 5

      How many results to show per page

    • isAdult: boolean = false

      Will show media for 18+ content if true

    Returns Promise<{ data: any[] }>

    An array of all results

  • setAuth(auth: string): Promise<void>
  • Set a auth token used in request's needing one

    Parameters

    • auth: string

      The auth token to use for requests

    Returns Promise<void>

Generated using TypeDoc