UNPKG

omeku-api

Version:

JS wrapper for https://omeku.glitch.me

56 lines (41 loc) 1.24 kB
[![npm](https://img.shields.io/npm/dt/omeku-api.svg?maxAge=3600)](https://www.npmjs.com/package/omeku-api) [![install size](https://packagephobia.now.sh/badge?p=omeku-api)](https://packagephobia.now.sh/result?p=omeku-api) [![NPM](https://nodei.co/npm/omeku-api.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/omeku-api/) # omeku-api ## Installation ``` npm i --save omeku-api ``` Wrapper for https://omeku.glitch.me ### Api | Endpoint | Description | | -------- | ----------- | | `pat` | Get a URL of a pat gif | | `neko` | Get a URL of a neko image | | `kiss` | Get a URL of a kiss gif | | `hug` | Get a URL of a hug gif | | `lick` | Get a URL of a lick gif | ## Examples Example for an Async/Await function: ```js const OmekuClient = require('omeku-api'); const omeku = new OmekuClient(); async function hug() { console.log(await omeku.api.hug()); } hug(); ``` will return: ```js { url: 'https://omeku.glitch.me/hug/hug_1.gif' } ``` Example for a Promise: ```js const OmekuClient = require('omeku-api'); const omeku = new OmekuClient(); omeku.api.neko().then((neko) => console.log(neko)); ``` will return: ```js { url: 'https://omeku.glitch.me/neko/neko_1.png' } ```