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

mcu-sdk

v1.0.5

Published

MCU-SDK provides a set of methods to access the data provided by the Marvel Comics API.

Downloads

6

Readme

mcu-sdk

dt l min types v

npm

Introduction

mcu-sdk provides a set of methods to access the data provided by the Marvel Comics API. Marvel Comics data is freely available on the Marvel Developer Portal. You can use mcu-sdk to access that data and use it in your own fun projects. All you need to do is to sign up for a developer account on the Marvel Developer Portal and get your API keys.

Prerequisites

Node.js v18.x LTS or higher is required to use mcu-sdk.

Note: Latest LTS version of Node.js is recommended.

Installation

npm i mcu-sdk

Usage

Initialize the API

const { MarvelAPI } = require("mcu-sdk");

const api = MarvelAPI.init("PRIVATE_KEY", "PUBLIC_KEY");

Replace PRIVATE_KEY and PUBLIC_KEY with your own Marvel API keys. You can get them from the Marvel Developer Portal.

Call any of the available methods

api.{METHOD}({PARAMETERS})

Replace {METHOD} with any of the available methods and {PARAMETERS} with the query parameters you want to pass to the method.

Available Methods

  • getAllCharacters()
  • getCharacterById(characterId)
  • getCharacterComics(characterId)
  • getCharacterEvents(characterId)
  • getCharacterSeries(characterId)
  • getCharacterStories(characterId)
  • getAllComics()
  • getComicById(comicId)
  • getComicCharacters(comicId)
  • getComicCreators(comicId)
  • getComicEvents(comicId)
  • getComicStories(comicId)
  • getAllCreators()
  • getCreatorById(creatorId)
  • getCreatorComics(creatorId)
  • getCreatorEvents(creatorId)
  • getCreatorSeries(creatorId)
  • getCreatorStories(creatorId)
  • getAllEvents()
  • getEventById(eventId)
  • getEventCharacters(eventId)
  • getEventComics(eventId)
  • getEventCreators(eventId)
  • getEventSeries(eventId)
  • getEventStories(eventId)
  • getAllSeries()
  • getSeriesById(seriesId)
  • getSeriesCharacters(seriesId)
  • getSeriesComics(seriesId)
  • getSeriesCreators(seriesId)
  • getSeriesEvents(seriesId)
  • getSeriesStories(seriesId)
  • getAllStories()
  • getStoryById(storyId)
  • getStoryCharacters(storyId)
  • getStoryComics(storyId)
  • getStoryCreators(storyId)
  • getStoryEvents(storyId)
  • getStorySeries(storyId)

Example

const { MarvelAPI } = require("mcu-sdk");

const api = MarvelAPI.init("PRIVATE_KEY", "PUBLIC_KEY");

api.getAllCharacters()
 .then((response) => {
  console.log(response.data);
 })
 .catch((error) => {
  console.error(error);
 });

Query Parameters

You can pass query parameters to the methods to filter the results. For example:

api.getAllCharacters({
 limit: "10",
 offset: "10",
})
 .then((response) => {
  console.log(response.data);
 })
 .catch((error) => {
  console.error(error);
 });

You can find the list of available query parameters for each method in the Marvel API documentation.

Terms of Use

By using mcu-sdk, you agree to comply with the Marvel API Terms of Use.

You must attribute Marvel as the source of data whenever you display any results from the Marvel Comics API. Please use the following text on every application screen or web page which displays the API result: "Data provided by Marvel. © 2014 Marvel"