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

@mrbeastprolevel/popcat-api-wrapper-v2

v1.2.2

Published

An API wrapper for the pop cat API to make your life easier while using it!

Downloads

42

Readme

Installation

npm i @mrbeastprolevel/popcat-api-wrapper-v2

Examples

Jokes command, no input example:

const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");
const Discord = require("discord.js");
const client = new Discord.Client({
  intents: ["Guilds", "GuildMessages", "GuildMembers"],
});

client.on("messageCreate", async (message) => {
  if (message.content.toLowerCase() === ">joke") {
    const joke = await pop.joke();
    joke.then(async (res) => {
      <Channel>.send(res);
    });
  }
});

client.login("bot token");

Biden command, 1 text input example

const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");
const Discord = require("discord.js");

const text = "String";
const img = await pop.biden(text);
img.then(() => {
  const image = new Discord.AttachmentBuilder(img, { name: "biden.png" });
  <Channel>.send({
    files: [image],
  });
});

Pooh meme command, more than one text input example

const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");
const Discord = require("discord.js");

const text1 = "String";
const text2 = "String 2";
const img = await pop.pooh(text1, text2);
img.then(() => {
  const image = new Discord.AttachmentBuilder(img, { name: "pooh.png" });
  <Channel>.send({
    files: [image],
  });
});

Screenshot command, image output / output example \

 const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");
 const Discord = require("discord.js");
 
 const url = "https://youtube.com" // Any url
 const ss = await pop.screenshot(url);

 ss.then(() => {
   const image = new Discord.AttachmentBuilder(ss, { name: "screenshot.png" });
  <Channel>.send({
     files: [image],
   })
   })

Drip command, image input example

const Discord = require("discord.js");
const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");

let user = message.mentions.users.first() || message.author;
const av = user.displayAvatarURL();

const image = await pop.drip(av);

image.then(() => {
  const attachment = new Discord.AttachmentBuilder(res, { name: "drip.png" });
  <Channel>.send({
    files: [attachment],
  });
});

Lyrics command, object output example :

const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");
const song = "Zayn Vibez" // Song name
const lyrics = pop.lyrics(song)
lyrics.then(async (res) => {
    console.log(res) // This will return an object with the song name, artist, and lyrics etc.
    // console.log(data[0].lyrics) -> To get the lyrics only
    // console.log(data[0].artist) -> To get the artist only
    // console.log(data[0].title) -> To get the song name only
    // console.log(data[0].album) -> To get the album name only 
    // console.log(data[0].image) -> To get the album image only
})

/**
 {
   lyrics: 'Lyrics',
   artist: 'Artist',
   title: 'Title',
   album: 'Album',
  image: 'Image'
 }*/

Color command, object output example :

const pop = require("@mrbeastprolevel/popcat-api-wrapper-v2");

const color = "ffcc99";
const output = await pop.colorinfo(color);
output.then(async (res) => {
  console.log(res);
});
/**
 {
 "hex": "#ffcc99",
 "name": "Peach Orange",
 "rgb": "rgb(255,204,153)",
 "color_image": "https://api.popcat.xyz/color/image/ffcc99",
 "brightened": "#ffe6cc"
}*/

So, if you want to collect for example the rgb, you need to:

console.log(output.rgb) (gives out the rgb value of 'ffcc99' hex.)

This method applies for Playstore, iTunes, WouldYouRather, RandomMeme, instagramUser, npm and Colorinfo.

Welcome Card

const pop = require('@mrbeastprolevel/popcat-api-wrapper-v2')
const Discord = require("discord.js")
const image = await pop.welcomecard(background, avatar, text_1, text_2, text_3)
image.then(() => {
  const attachment = new Discord.AttachmentBuilder(image, { name: "welcomecard.png" })
<Channel>.send({ files: [attachment] })
})

Endpoints

You can get a full list of the possible API endpoints Here

Copyright

  • This API wrapper v1 was coded by popcat api developer. I've just updated and added quite a few new things init. Copyright goes to him respectively!. Click here To see the v1 wrapper.

Support

DM Zayn#9478 For Help & Support