Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.
/ derpyapi.js Public archive

Official node.js wrapper for Derpy API

License

Notifications You must be signed in to change notification settings

davidcralph/derpyapi.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 

Repository files navigation

derpyapi.js

Official node.js wrapper for the Derpy API

Installation

npm install derpyapi.js (or yarn add derpyapi.js if you're cool)

Example

Async

const { miku } = require('derpyapi.js');

async function getMiku() {
  const gang = await miku();
  return gang;
}

console.log(getMiku());

Sync

const { miku } = require('derpyapi.js');

miku().then(res => console.log(res)).catch(err => console.log(err));

Methods

GET /img
Returns random wallpaper/gif
Example: /takagi
Options: 
Wallpaper: /takagi, /miku, /ddlc,
Gif:  /k_on, /lovelive, /konosuba, /sao
NSFW: /nekopara  (?type=gif also works if you like gifs), /overwatch

GET /text
Modifies given text
Example: /flip?text=uwu
Options: /mock, /flip, /reverse, /flip, /leet, /cramp, /space, /indicator, /aesthetic, /tiny, /clapify, /eyeify

GET /imagegen
Generates good quality memes yes
Example: /kirb?text=qts are qt af, /jpeg?url=https://<url>
Options: 
URL: /jpeg, /invert, /flip, /grayscale, /blur, /pillow
Text: /letter, /paper, /kirb

Credits

August for originally updating stuff

Speyd3r for hosting API <3