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

mcchampionship

v1.0.1

Published

MCC API v1 wrapper

Downloads

12

Readme

mcchampionship

MCC API v1(.3.2) wrapper with no runtime dependencies. Built with Bun.

Runs on Node.js v18+.

Examples

import { v1 } from 'mcchampionship';

// Get the current event cycle's information
// https://api.mcchampionship.com/docs#/v1/AppController_getEventInformation
v1.getCurrentEventCycle().then((event) => {
    console.log(`the next event (${event.data.event}) starts at ${event.data.date}, here's the update video: ${event.data.updateVideo}`);
});

// Get the rundown of the most recent event
// https://api.mcchampionship.com/docs#/v1/AppController_getRundown
v1.getRecentEventRundown().then((rundown) => {
    console.log(`the creators in aqua team for the most recent event were ${rundown.data.creators.AQUA.join(", ")}`);
});

// Get the rundown of an event. Updates at the end of each event
// https://api.mcchampionship.com/docs#/v1/AppController_getEventRundown
v1.getEventRundown("1").then((rundown) => {
    console.log(`JackSucksAtMC's score in MCC1 was ${rundown.data.individualScores["JackSucksAtMC"]}`);
});

// Get a list of all participants in this event cycle
// https://api.mcchampionship.com/docs#/v1/AppController_getParticipants
v1.getParticipants().then((participants) => {
    let totalParticipants = 0;
    Object.keys(participants.data).forEach((team) => {
        totalParticipants += participants.data[team].length;
    });
    console.log(`there are ${totalParticipants} participants in this event cycle (including spectators)`);
});

// Get a list of all participants in the given team in this event cycle
// https://api.mcchampionship.com/docs#/v1/AppController_getParticipantsByTeam
v1.getParticipantsOfTeam(v1.Team.AQUA).then((participants) => {
    console.log(`the participants in the aqua team are ${participants.data.map((participant) => participant.username).join(", ")}`);
});



// (Deprecated) Get the entire Legacy Hall of Fame
// https://api.mcchampionship.com/docs#/%5BDeprecated%5D%20v1/AppController_getHallOfFame
v1.getHallOfFame().then((hallOfFame) => {
    // do something with the hall of fame data
});

// (Deprecated) Get all statistics in the legacy Hall of Fame for the given game
// https://api.mcchampionship.com/docs#/%5BDeprecated%5D%20v1/AppController_getHallOfFameByGame
v1.getHallOfFameGame(v1.HOFGame.MG_ACE_RACE).then((game) => {
    // do something with the game data
});

Development

  1. Install Bun
  2. Install dependencies:
bun install

To run tests:

bun test