node-myanimelist
Version:
Node.js wrappers for MAL.
98 lines (97 loc) • 2.56 kB
TypeScript
/**
* # Top
*
* #### For more info visit <a href="https://jikan.docs.apiary.io/#reference/0/top" target="_blank">https://jikan.docs.apiary.io</a>
*
* To get top info you need to create top object and select type of entry, like so:
* ```ts
* let top = Jikan.top().anime();
* // .manga()
* // .people()
* // .characters()
* ```
* And then you can use top object multiple times to get desired information.
*
* ### Functions That You Can Use With All Types
* ```ts
* top.all(page?);
* ```
* ### Anime Specific Functions
* ```ts
* top.airing(page?);
* top.upcoming(page?);
* top.tv(page?);
* top.movie(page?);
* top.ova(page?);
* top.special(page?);
* ```
* ### Manga Specific Functions
* ```ts
* top.manga(page?);
* top.novels(page?);
* top.oneshots(page?);
* top.doujin(page?);
* top.manhwa(page?);
* top.manhua(page?);
* ```
* ### Manga & Anime Specific Functions
* ```ts
* top.byPopularity(page?);
* top.favorite(page?);
* ```
* Each of those functions returns promise
* ## Examples
* ```ts
* Jikan.top().anime().all()
* .then(res => res.data)
* .then(topJson => {});
* Jikan.top().anime().movie()
* .then(res => res.data)
* .then(topJson => {});
* ```
*/
export declare class Top {
/** @ignore */
private baseUrl;
constructor();
anime(): TopAnime;
manga(): TopManga;
people(): TopSimple;
characters(): TopSimple;
}
export declare class TopSimple {
private baseUrl;
private type;
constructor(baseUrl: string, type: string);
private topGet;
all(p?: number): Promise<any>;
}
export declare class TopAnime {
private baseUrl;
constructor(baseUrl: string);
private topGet;
all(p?: number): Promise<any>;
airing(p?: number): Promise<any>;
upcoming(p?: number): Promise<any>;
tv(p?: number): Promise<any>;
movie(p?: number): Promise<any>;
ova(p?: number): Promise<any>;
special(p?: number): Promise<any>;
byPopularity(p?: number): Promise<any>;
favorite(p?: number): Promise<any>;
}
export declare class TopManga {
private baseUrl;
constructor(baseUrl: string);
private topGet;
all(p?: number): Promise<any>;
manga(p?: number): Promise<any>;
novels(p?: number): Promise<any>;
oneshots(p?: number): Promise<any>;
doujin(p?: number): Promise<any>;
manhwa(p?: number): Promise<any>;
manhua(p?: number): Promise<any>;
byPopularity(p?: number): Promise<any>;
favorite(p?: number): Promise<any>;
}
export declare function top(): Top;