Imgflip NPM Module
A module for the interacting with the Imgflip API.
Install ¶
Install with npm:
$ npm i imgflip --save
Usage ¶
const imgflip = require('imgflip')
// https://imgflip.com/signup
imgflip.credentials({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD'
})
/* https://api.imgflip.com/get_memes
* Get top 100 popular meme formats
*/
imgflip.memes().then(memes => {
// ID of the top meme
const id = memes[0]['id']
// Get URL instead using imgflip.meme, omit path argument
return imgflip.image('meme.jpg', id, 'MEME', 'CITY')
})
Contributing ¶
Pull requests and stars on the GitHub repository are always welcome. For bugs and feature requests, please create an issue.
Running Tests ¶
Install dev dependencies:
$ npm i -d && npm test
License ¶
Copyright © 2018 Tomer Aberbach Released under the MIT license.