UNPKG

node-myanimelist

Version:
33 lines (32 loc) 969 B
import { Req } from "./jikanApi"; import { CharacterInfo, Pictures } from "./types/character"; export * from "./types/character"; /** * # Character * * #### For more info visit <a href="https://jikan.docs.apiary.io/#reference/0/character" target="_blank">https://jikan.docs.apiary.io</a> * To get character you need to create character object, like that: * ```ts * let character = Jikan.character(id); * ``` * Now you can use character object multiple times to get desired information. * ```ts * character.info(); * character.pictures(); * ``` * Each of those functions returns promise * ## Example * ```ts * character.info() * .then(res => res.data) * .then(characterJson => characterJson.name); * ``` */ export declare class Character { /** @ignore */ private baseUrl; constructor(id: number); info(): Req<CharacterInfo>; pictures(): Req<Pictures>; } export declare function character(id: number): Character;