Mika Scraper / Nakanime
Class: Nakanime
Defined in: src/nakanimendo/nakanime.ts:47
Class for accessing anime data from the Nakanime unofficial API.
Constructor
new Nakanime()
Creates an instance of the Nakanime class.
Returns
Nakanime โ A new instance of the Nakanime class.
Methods
get()
get(order: string = 'latest', page: number = 1): Promise<SearchResult>Defined in: src/nakanimendo/nakanime.ts:66
Retrieves a list of anime sorted according to the specified order.
Parameters
order(string, optional): Specifies the sorting method. Acceptable values include'title','latest', and'popular'. Defaults to'latest'.page(number, optional): The page number to retrieve. Defaults to1.
Returns
Promise<SearchResult> โ A promise that resolves to a SearchResult object containing the list of anime.
genre()
genre(genre: string, page: number = 1): Promise<any>Defined in: src/nakanimendo/nakanime.ts:90
Retrieves a list of anime filtered by the specified genre.
Parameters
genre(string): The genre slug to filter by (e.g.,'action','comedy').page(number, optional): The page number to retrieve. Defaults to1.
Returns
Promise<any> โ A promise that resolves to an array of anime matching the specified genre.
search()
search(query: string): Promise<SearchResult>Defined in: src/nakanimendo/nakanime.ts:109
Searches for anime using the specified keyword.
Parameters
query(string): The search term to look for in the anime database.
Returns
Promise<SearchResult> โ A promise that resolves to a SearchResult object containing the search results.
getDetail()
getDetail(url: string): Promise<any>Defined in: src/nakanimendo/nakanime.ts:121
Retrieves detailed information about an anime from the specified URL.
Parameters
url(string): The URL of the anime detail page.
Returns
Promise<any> โ A promise that resolves to an object containing detailed information about the anime.
getData()
getData(url: string): Promise<any>Defined in: src/nakanimendo/nakanime.ts:138
Retrieves episode data from the specified URL.
Parameters
url(string): The URL of the episode.
Returns
Promise<any> โ A promise that resolves to an object containing episode data.