UNPKG

koishi-plugin-jmcomic-api

Version:
42 lines (41 loc) 1.73 kB
import { Context, Schema, Logger, Service } from 'koishi'; export declare const name = "jmcomic-api"; export interface Config { apiUrl: string; getDataMethod: 'base64' | 'form-data' | 'url'; defaultPassword: string; } export declare const Config: Schema<Schemastery.ObjectS<{ apiUrl: Schema<string, string>; defaultPassword: Schema<string, string>; }> | Schemastery.ObjectS<{ getDataMethod: Schema<"base64" | "form-data" | "url", "base64" | "form-data" | "url">; }>, { apiUrl: string; defaultPassword: string; } & import("cosmokit").Dict & { getDataMethod: "base64" | "form-data" | "url"; }>; export declare const inject: { required: string[]; optional: string[]; }; export declare const usage = "\n# \u5B89\u88C5 <br>\n1.\u540E\u7AEF\u5B89\u88C5\u524D\u9700\u8981Python <br>\n2.\u5728\u7EC8\u7AEF\u6267\u884C\u4EE5\u4E0B\u6307\u4EE4 <br>\n```\npip install jmcomic_api\npython -m jmcomic_api \n``` <br>\n\u628AAPI\u586B\u5165\u914D\u7F6E\u5373\u53EF <br>\n"; export declare let logger: Logger; export declare function apply(ctx: Context, config: Config): void; declare class JMComicService extends Service { config: Config; constructor(ctx: Context, config: Config); private fetchAPI; getRanking(type?: 'day' | 'week' | 'month', page?: number): Promise<any>; search(keyword: string, type?: 'site' | 'tags' | 'author' | 'work', page?: number): Promise<any>; getComicInfo(jm_id: number): Promise<any>; prepareDownload(jm_id: number, noCache?: boolean): Promise<void>; getFileData(jm_id: number, fileType: string, password?: string): Promise<any>; } declare module 'koishi' { interface Context { jmcomic: JMComicService; } } export {};