@apiverve/dadjokes
Version:
Dad Jokes is a simple tool for getting dad jokes. It returns a random dad joke.
22 lines (18 loc) • 661 B
TypeScript
declare module '@apiverve/dadjokes' {
export interface dadjokesOptions {
api_key: string;
secure?: boolean;
}
export interface dadjokesResponse {
status: string;
error: string | null;
data: any;
code?: number;
}
export default class dadjokesWrapper {
constructor(options: dadjokesOptions);
execute(callback: (error: any, data: dadjokesResponse | null) => void): Promise<dadjokesResponse>;
execute(query: Record<string, any>, callback: (error: any, data: dadjokesResponse | null) => void): Promise<dadjokesResponse>;
execute(query?: Record<string, any>): Promise<dadjokesResponse>;
}
}