$ npm install fetch-the-parrot
Returns the object for the queried parrot.
(name?: string, url?: string) => Promise<ParrotRecord | null>
import { getParrot } from 'fetch-the-parrot';
const parrot = await getParrot('Party Parrot');
Loading...
Returns the .gif
path for the queried parrot.
(name?: string, path?: string, url?: string) => Promise<string | null>
import { getParrotGif } from 'fetch-the-parrot';
const parrotGif = await getParrotGif('Party Parrot');
Loading...
import { getParrotsJSON } from 'fetch-the-parrot';
const json = await getParrotsJSON();
Loading...
import { getParrotsYAML } from 'fetch-the-parrot';
const yaml = await getParrotsYAML();
Loading...
interface ParrotRecord {
name: string;
gif?: string;
hd?: string;
tip?: string;
}
type ParrotRecords = ParrotRecord[];