Skip to content

mattdesl/marvel-characters

Repository files navigation

marvel-characters

stable

A list of all public comic book character names in the Marvel universe, sourced from the API.

Total Characters: 1,252
Last Updated: Sunday, July 19th, 2015.

Data provided by Marvel. © 2015 Marvel

Install

npm install marvel-characters [--g|--save]

Example

var marvel = require('marvel-characters')

// random character
console.log(marvel())
//=> 'Iron Man'

// all characters
console.log(marvel.characters)
//=> ["3-D Man", "A-Bomb", ..., "Zuras", "Zzzax"]

Usage

NPM

API

name = marvel()

Returns a random Marvel character name, like "Spider-Man".

list = marvel.characters

The array of all character names.

list = require('marvel-characters/characters.json')

The required JSON array.

CLI

You can also use the CLI here.

Usage:
  marvel-characters [opt]
  
Options:
  --help  show help
  --all   list all characters 

Example:

$ marvel-characters
Green Goblin

Running From Source

Clone & install:

git clone https://github.com/mattdesl/marvel-characters.git
cd marvel-characters
npm install

You will need a Marvel Developer account. Once you have API keys, copy them into a .marvel-charactersrc file in the same directory. It should look like this, with your keys:

{
  "privateKey": "egadg545151232d02ea0b9asdfasdfd5699a",
  "publicKey": "badsg1cbadsggagafdh0"
}

Then use npm start to scrape the new data.

See Also

License

MIT, see LICENSE.md for details.

About

💥 all Marvel comic book characters

Resources

License

Stars

Watchers

Forks

Packages

No packages published