npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dankmemer

v1.0.1

Published

An API wrapper for Dank Memer API.

Downloads

18

Readme

DankMemer.js

An API wrapper for Dank Memer API.

NPM

Installing

npm i --save dankmemer.js

Usage

const DankMemer = require("dankmemer");
const memer = new DankMemer("Your API Token Goes Here");

Example

const DankMemer = require("dankmemer");
const memer = new DankMemer("Dank Memer Api Key");
const Discord = require("discord.js");
const client = new Discord.Client();

client.on("ready", () => {
    console.log(`Memer is online!`);
});

client.on("message", async(message) => {
    if (!message.guild || message.author.bot) return;
    if (message.content === "spank") {
        let userone = message.author.displayAvatarURL;
        let usertwo = client.user.displayAvatarURL;
        let image = await memer.spank(userone, usertwo);

        const attachment = new Discord.Attachment(image, "spank.png")
        return message.channel.send(attachment);
    }
})

client.login("Discord Bot Token");

Methods

  • async-await
async function spank(avatar1, avatar2) {
    let img = await memer.spank(avatar1, avatar2);
    message.channel.send({ file: img });
}
spank();
  • .then
memer.spank(avatar1, avatar2).then(img => {
    message.channel.send({ file: img });
})

Getting API Key

Go to dankmemer.services/dashboard and request for API key.

Functions

  • abandon
  • aborted
  • affect
  • airpods
  • america
  • armor
  • balloon
  • bed
  • bongocat
  • boo
  • brain
  • brazzers
  • byemom
  • cancer
  • changemymind
  • cheating
  • citation
  • communism
  • confusedcat
  • corporate
  • crab
  • cry
  • dab
  • dank
  • deepfry
  • delete
  • disability
  • doglemon
  • door
  • egg
  • excuseme
  • expanddong
  • facts
  • failure
  • fakenews
  • fedora
  • floor
  • fuck
  • garfield
  • gay
  • goggles
  • hitler
  • humansgood
  • inator
  • invert
  • jail
  • justpretending
  • kimborder
  • knowyourlocation
  • kowalski
  • laid
  • lick
  • madethis
  • magik
  • master
  • meme
  • note
  • nothing
  • ohno
  • piccolo
  • plan
  • presentation
  • quote
  • radialblur
  • rip
  • salty
  • satan
  • savehumanity
  • screams
  • shit
  • sickban
  • slap
  • slapsroof
  • sneakyfox
  • spank
  • stroke
  • surprised
  • sword
  • thesearch
  • trash
  • tiger
  • trigger
  • tweet
  • ugly
  • unpopular
  • violence
  • violentsparks
  • vr
  • walking
  • wanted
  • wrap
  • whodidthis
  • whothisis
  • yomomma
  • youtube

RateLimits [ Source: Dank Memer API ]

Rate Limits Each endpoint has it's own ratelimit, which you can find in it's documentation. Additionally, the API has a global ratelimit of 300 requests per minute.

The ratelimits for the endpoint are defined with X-RateLimit-:key, while the global ratelimit is defined with X-Global-RateLimit-:key. When the global ratelimit is hit, the body will contain an additional JSON key "global" which will be set to true.

Ratelimit Headers

  • X-RateLimit-Limit: Maximum usage allowed per timeframe
  • X-Ratelimit-Remaining: Remaining requests that can be made during the timeframe
  • X-RateLimit-Reset: Timestamp indicating when the ratelimit will reset in milliseconds.
  • Retry-After: Time to wait in milliseconds until another request can be made. Only exposed if ratelimit is reached.
  • X-Global-RateLimit-Limit: Maximum global usage allowed per timeframe
  • X-Global-Ratelimit-Remaining: Remaining requests that can be made globally during the timeframe
  • X-Global-RateLimit-Reset: Timestamp indicating when the global ratelimit will resett in milliseconds.
  • Retry-After: Time to wait in milliseconds until another request can be made. Only exposed if ratelimit is reached.

API Docs

Click Here

My GitHub

Click Here