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

mario-maker-api

v1.4.0

Published

This is an unofficial api for Mario Maker that gets courses, bookmarks courses, unbookmarks courses. Read the readme to find out more :).

Downloads

19

Readme

Unofficial Mario Maker Api

This api utilizes Cheerio, & Axios to scrape and fetch data from Mario Makers bookmark site.

Methods

All public methods are asynchronous functions

login

Logs into Mario Maker bookmark site and sets session

  • @param: json object that takes username and password
  • @returns: returns the MM class instance
(async () => {
    let loggedIn = await MM.login({
        'username': 'Nintendo Username',
        'password': 'Nintendo Pass'
    });
})()

bookmark

This requires you to be logged in so you would log in first then start bookmarking such as:

  • @param: courseId
  • @returns: Course JSON object
(async () => {
    let loggedIn = await MM.login({
        'username': 'Nintendo Username',
        'password': 'Nintendo Pass'
    });
    
    let bookmarkData = await loggedIn.bookmark('F870-0000-03EE-27E7');
    console.log(bookmarkData);
})()

unBookmark

As above requires you to be logged in so you would log in first then start unbookmarking such as:

  • @param: courseId
  • @returns: Course JSON object
(async () => {
    let loggedIn = await MM.login({
        'username': 'Nintendo Username',
        'password': 'Nintendo Pass'
    });
    
    let bookmarkData = await loggedIn.unBookmark('F870-0000-03EE-27E7');
    console.log(bookmarkData);
})()

getBookmarks

As above requires you to be logged in so you would log in first then get all user bookmarks such as:

  • @param: options, only takes paged
  • @returns: All user bookmarked courses JSON array
(async () => {
    let bookmarksData = await MM.getBookmarks({
        paged: 1
    });
    console.log(bookmarksData);
})()

getCourse

This does not require being signed in to use

  • @param: courseId
  • @returns: JSON info about course
(async () => {
    let loggedIn = await MM.login({
        'username': 'Nintendo Username',
        'password': 'Nintendo Pass'
    });
    
    let courseData = await MM.getCourse('DF5D-0000-03B7-E3F3');
    console.log(courseData);
})()

Full Example

You can chain multiple async functions like below with promise all

(async () => {
    let loggedIn = await MM.login({
        'username': 'Nintendo Username',
        'password': 'Nintendo Pass'
    });
    
    let bookmarkPromises = [
        loggedIn.bookmark('DF5D-0000-03B7-E3F3'),
        loggedIn.bookmark('F870-0000-03EE-27E7')
    ];

    //Get all the data from the async functions
    let bookmarkData = await Promise.all(bookmarkPromises);
    console.log(bookmarkData);

    let unBookmarkPromises = [
        loggedIn.unBookmark('DF5D-0000-03B7-E3F3'),
        loggedIn.unBookmark('F870-0000-03EE-27E7')
    ];

    //Get all the data from the asyc functions
    let unBookmarkData = await Promise.all(unBookmarkPromises);
    console.log(unBookmarkData);
})()

TODO:

Need to still add conditionals for when things go wrong, like wrong course id or not logged in.

Contribution:

For contribution please open up an issue and follow gitflow workflow practices: https://www.atlassian.com/git/tutorials/comparing-workflows