1.1.2 • Published 2 years ago

dankmemerapi v1.1.2

Weekly downloads
7
License
MIT
Repository
github
Last release
2 years ago

Dank Memer API

This is an api wrapper built for Dank Memer's Image Generation API.

npm.io

Deprecation

As of writing this, Dank Memer has privatized their api and revoked most (if not all) api keys. If you are looking for a solution to this, I've made my own which you can see here. You can also use it through this module, by setting baseURL to https://imgen.yiff.rest/api. If you want to run it on your own, you can look at the original source, or my dockerized version (pre-rebranding, Jun 19, 2022).

JavaScript Example:

const DankMemerAPI = require("dankmemerapi");
const { writeFile } = require("fs/promises");
// only apiKey is required
const DMAPI = new DankMemerAPI({ apiKey: "api key", userAgent: "SomeUserAgent/1.0.0", baseURL: "https://dankmemer.services/api" });
DMAPI.abandon("text to provide").then(response => writeFile(`${__dirname}/abandon.png`, response.file));

TypeScript Example:

import DankMemerAPI from "dankmemerapi";
import { writeFile } from "fs/promises";
// only apiKey is required
const DMAPI = new DankMemerAPI({ apiKey: "api key", userAgent: "SomeUserAgent/1.0.0", baseURL: "https://dankmemer.services/api" });
DMAPI.abandon("text to provide").then(response => writeFile(`${__dirname}/abandon.png`, response.file));

The return of the functions is this structure (using the TS interface as an example):

interface MemeRequestResponse {
    ext: string;
    mime: string;
    file: Buffer;
}

ext will be the file extension of what was returned, mime will be the mime type of what was returned, and file will be the actual data returned.

The only function that differentiates from this is the yomomma function, which returns just a string.

1.1.1

2 years ago

1.1.0

2 years ago

1.1.2

2 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.27

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago