trace.moe.ts
Version:
An API wrapper for https://trace.moe with typings
37 lines (36 loc) • 1.33 kB
TypeScript
/// <reference types="node" />
import { MeResponse } from "../structures/MeResponse";
import { SearchParameters } from "../structures/SearchParameters";
import { SearchResponse } from "../structures/SearchResponse";
import { Utils } from "./Utils";
export declare class API {
private uris;
/**
* The utils class.
*/
utils: Utils;
/**
* Constructs an instance of the API.
*/
constructor();
/**
* Searches the website for the similar anime.
* @param {string} imageURL The URL for the image.
* @param {SearchParameters} options Optional parameters for the search.
* @returns {SearchResponse}
*/
fetchAnime(imageURL: string, options?: SearchParameters): Promise<SearchResponse>;
/**
* Searches the website for the similar anime but this time using an image file.
* @param {Buffer} buffer The image buffer. Limited to 25 MB.
* @param {SearchParameters} options Optional parameters for the search.
* @returns {SearchResponse}
*/
fetchAnimeFromBuffer(buffer: Buffer, options?: SearchParameters): Promise<SearchResponse>;
/**
* Returns your search quota and limits for your account.
* @param {string} key Your API key for trace.moe.
* @returns {MeResponse}
*/
fetchMe(key?: string): Promise<MeResponse>;
}