Constructors
constructor
- new API(options?: {}): API
Methods
doujinExists
- doujinExists(id: string | number): Promise<boolean>
-
Parameters
Returns Promise<boolean>
Private fetch
- fetch(path: string): Promise<unknown>
-
Parameters
Returns Promise<unknown>
parsed JSON
fetchDoujin
- fetchDoujin(id: string | number): Promise<null | Doujin>
-
Parameters
Returns Promise<null | Doujin>
fetchHomepage
-
Parameters
-
page: string | number = 1
-
randomDoujin
- randomDoujin(): Promise<Doujin>
randomDoujinID
- randomDoujinID(): Promise<number>
search
-
Parameters
-
query: string
-
page: string | number = 1
-
searchByTagID
-
Parameters
-
id: string | number
-
page: string | number = 1
-
searchRelated
- searchRelated(id: string | number, page?: string | number): Promise<SearchResult>
-
Parameters
-
id: string | number
-
page: string | number = 1
Constuct a new API wrapper