snowflake-api
Version:
Official api wrapper for snowflake api.
122 lines (121 loc) • 3.18 kB
TypeScript
/// <reference types="node" />
import * as Types from "./typings/types";
import { Constants } from "./Constants";
declare class Client {
/**
* Client api key
*/
token: string;
/**
* API base url
*/
BASE_URL: string;
/**
* Creates new api client
* @param token API key
*/
constructor(token?: string);
setBaseURL(url: string): void;
/**
* Returns meme object
* @param sbr Subreddit
*/
meme(sbr?: string): Promise<Types.MemeResponse>;
/**
* Returns fake discord bot token
*/
discordToken(): Promise<string>;
/**
* AI chatbot
*/
chatbot(options: Types.AIChatbotInterface): Promise<string>;
/**
* Random cat image
*/
cat(): Promise<Buffer>;
/**
* Random dog image
*/
dog(): Promise<Buffer>;
/**
* Random duck image
*/
duck(): Promise<Buffer>;
/**
* Random fox image
*/
fox(): Promise<Buffer>;
/**
* Random roast
*/
roast(): Promise<string>;
/**
* Pokemon info
* @param name Pokemon name or id
*/
pokemon(name: string): Promise<Types.PokemonResponse>;
/**
* Morse code encoder/decoder
* @param data message to encode/decode
* @param type ENCODE or DECODE
*/
morseCode(data: string, type: "ENCODE" | "DECODE"): Promise<string>;
/**
* get package information from deno registry
* @param moduleName Module name
*/
deno(moduleName: string): Promise<Types.DenoResponse>;
/**
* get package information from npm registry
* @param moduleName Module name
*/
npm(moduleName: string): Promise<Types.NPMResponse>;
/**
* get package information from pypi registry
* @param moduleName Module name
*/
pypi(moduleName: string): Promise<Types.PypiResponse>;
/**
* Reverse a message
* @param message Message to reverse
*/
reverse(message: string): Promise<string>;
/**
* Returns discord bot token information
* @param token Discord bot token
*/
tokeninfo(token: string): Promise<Types.TokenInfo>;
/**
* Returns API stats
*/
stats(): Promise<Types.StatsResponse>;
/**
* Returns current user info
*/
me(): Promise<Types.MeResponse>;
/**
* Base64 encoder/decoder
* @param data message to encode/decode
* @param type ENCODE or DECODE
*/
base64(data: string, type: "ENCODE" | "DECODE"): Promise<string>;
/**
* Returns basic github stats of a user
* @param username GitHub username
*/
githubStats(username: string): Promise<Types.GitHubUserInterface>;
/**
* Returns basic youtube stats of a channel
* @param channelID YouTube channel id
*/
youtube(channelID: string): Promise<Types.YouTubeChannelInterface>;
/**
* Private method used to request
* @private
* @ignore
*/
private _request;
static get version(): string;
}
export { Client, Constants };
export default Client;