1.0.2 • Published 6 years ago

@jdeurt/ifunny-api v1.0.2

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

ifunny-api

Unofficial iFunny API. Can do basic interactions with memes such as liking and commenting and can also let you programatically upload your own.

Installation

npm i @jdeurt/ifunny-api

Usage

const IFunnyClient = require("@jdeurt/ifunny-api");

const bot = new IFunnyClient();

(async function() {
    await bot.login({
        email: "your@email.address",
        password: "password"
    });

    // Cycle through trending memes
    const trending = await bot.getTrending();
    const memeFeed = await bot.getFeed(trending[0]);

    for (let memePath in memeFeed) {
        const meme = await bot.getMeme(memePath);

        // Comment, like, and close each meme in the feed
        await meme.comment("I am using the @jdeurt/ifunny-api package!");
        await meme.like();
        await meme.done();
    }

    // Upload your own meme!
    await bot.uploadMeme({
        filePath: "/path/to/meme",
        description: "optional meme description",
        tags: [
            "optimal",
            "meme",
            "tags"
        ]
    });
})();

More documentation coming soon!