1.22.2 • Published 6 years ago

ncxxcnmx v1.22.2

Weekly downloads
4
License
-
Repository
-
Last release
6 years ago

Getting started

Marvel Comics API SDK

How to Build

The generated SDK relies on Node Package Manager (NPM) being available to resolve dependencies. If you don't already have NPM installed, please go ahead and follow instructions to install NPM from here. The SDK also requires Node to be installed. If Node isn't already installed, please install it from here

NPM is installed by default when Node is installed

To check if node and npm have been successfully installed, write the following commands in command prompt:

  • node --version
  • npm -version

Version Check

Now use npm to resolve all dependencies by running the following command in the root directory (of the SDK folder):

npm install

Resolve Dependencies

Resolve Dependencies

This will install all dependencies in the node_modules folder.

Once dependencies are resolved, you will need to move the folder MarvelComicsLib in to your node_modules folder.

How to Use

The following section explains how to use the library in a new project.

1. Open Project Folder

Open an IDE/Text Editor for JavaScript like Sublime Text. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

Click on File and select Open Folder.

Open Folder

Select the folder of your SDK and click on Select Folder to open it up in Sublime Text. The folder will become visible in the bar on the left.

Open Project

2. Creating a Test File

Now right click on the folder name and select the New File option to create a new test file. Save it as index.js Now import the generated NodeJS library using the following lines of code:

var lib = require('lib');

Save changes.

Create new file

Save new file

3. Running The Test File

To run the index.js file, open up the command prompt and navigate to the Path where the SDK folder resides. Type the following command to run the file:

node index.js

Run file

How to Test

These tests use Mocha framework for testing, coupled with Chai for assertions. These dependencies need to be installed for tests to run. Tests can be run in a number of ways:

Method 1 (Run all tests)

  1. Navigate to the root directory of the SDK folder from command prompt.
  2. Type mocha --recursive to run all the tests.

Method 2 (Run all tests)

  1. Navigate to the ../test/Controllers/ directory from command prompt.
  2. Type mocha * to run all the tests.

Method 3 (Run specific controller's tests)

  1. Navigate to the ../test/Controllers/ directory from command prompt.
  2. Type mocha MarvelComicsController to run all the tests in that controller file.

To increase mocha's default timeout, you can change the TEST_TIMEOUT parameter's value in TestBootstrap.js.

Run Tests

Initialization

Authentication

In order to setup authentication in the API client, you need the following information.

ParameterDescription
refererTODO: add a description
apikeyTODO: add a description

API client can be initialized as following:

const lib = require('lib');

// Configuration parameters and credentials
lib.Configuration.referer = "*.marvel.com";
lib.Configuration.apikey = "apikey";

Class Reference

List of Controllers

Class: CharactersController

Get singleton instance

The singleton instance of the CharactersController class can be accessed from the API Client.

var controller = lib.CharactersController;

Method: getCharacterCollection

Fetches lists of characters.

function getCharacterCollection(comics, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
comicsOptionalReturn only characters which appear in the specified comics (accepts a comma-separated list of ids).
eventsOptionalReturn only characters which appear in the specified events (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only characters which have been modified since the specified date.
nameOptionalReturn only characters matching the specified full character name (e.g. Spider-Man).
nameStartsWithOptionalReturn characters with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "modified", "-name", "-modified")
seriesOptionalReturn only characters which appear the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only characters which appear the specified stories (accepts a comma-separated list of ids).

Example Usage

    var comics = 'comics';
    var events = 'events';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getCharacterCollection(comics, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getCharacterIndividual

Fetches a single character by id.

function getCharacterIndividual(characterId, callback)

Parameters

ParameterTagsDescription
characterIdRequiredA single character id.

Example Usage

    var characterId = 'characterId';

    controller.getCharacterIndividual(characterId, function(error, response, context) {

    
    });

Errors

Error CodeError Description
404Character not found.

Method: getComicCharacterCollection

Fetches lists of characters filtered by a comic id.

function getComicCharacterCollection(comicId, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
comicIdRequiredThe comic id.
eventsOptionalReturn only characters which appear comics that took place in the specified events (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only characters which have been modified since the specified date.
nameOptionalReturn only characters matching the specified full character name (e.g. Spider-Man).
nameStartsWithOptionalReturn characters with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "modified", "-name", "-modified")
seriesOptionalReturn only characters which appear the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only characters which appear the specified stories (accepts a comma-separated list of ids).

Example Usage

    var comicId = 'comicId';
    var events = 'events';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getComicCharacterCollection(comicId, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getEventCharacterCollection

Fetches lists of characters filtered by an event id.

function getEventCharacterCollection(eventId, comics, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
eventIdRequiredThe event ID
comicsOptionalReturn only characters which appear in the specified comics (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only characters which have been modified since the specified date.
nameOptionalReturn only characters matching the specified full character name (e.g. Spider-Man).
nameStartsWithOptionalReturn characters with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "modified", "-name", "-modified")
seriesOptionalReturn only characters which appear the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only characters which appear the specified stories (accepts a comma-separated list of ids).

Example Usage

    var eventId = 'eventId';
    var comics = 'comics';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getEventCharacterCollection(eventId, comics, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getSeriesCharacterWrapper

Fetches lists of characters filtered by a series id.

function getSeriesCharacterWrapper(seriesId, comics, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, stories, callback)

Parameters

ParameterTagsDescription
seriesIdRequiredThe series id.
comicsOptionalReturn only characters which appear in the specified comics (accepts a comma-separated list of ids).
eventsOptionalReturn only characters which appear comics that took place in the specified events (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only characters which have been modified since the specified date.
nameOptionalReturn only characters matching the specified full character name (e.g. Spider-Man).
nameStartsWithOptionalReturn characters with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "modified", "-name", "-modified")
storiesOptionalReturn only characters which appear the specified stories (accepts a comma-separated list of ids).

Example Usage

    var seriesId = 'seriesId';
    var comics = 'comics';
    var events = 'events';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var stories = 'stories';

    controller.getSeriesCharacterWrapper(seriesId, comics, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getCharacterCollectionByStoryId

Fetches lists of characters filtered by a story id.

function getCharacterCollectionByStoryId(storyId, comics, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, callback)

Parameters

ParameterTagsDescription
storyIdRequiredThe story ID.
comicsOptionalReturn only characters which appear in the specified comics (accepts a comma-separated list of ids).
eventsOptionalReturn only characters which appear comics that took place in the specified events (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only characters which have been modified since the specified date.
nameOptionalReturn only characters matching the specified full character name (e.g. Spider-Man).
nameStartsWithOptionalReturn characters with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "modified", "-name", "-modified")
seriesOptionalReturn only characters which appear the specified series (accepts a comma-separated list of ids).

Example Usage

    var storyId = 'storyId';
    var comics = 'comics';
    var events = 'events';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';

    controller.getCharacterCollectionByStoryId(storyId, comics, events, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Back to List of Controllers

Class: ComicsController

Get singleton instance

The singleton instance of the ComicsController class can be accessed from the API Client.

var controller = lib.ComicsController;

Method: getComicsCharacterCollection

Fetches lists of comics filtered by a character id.

function getComicsCharacterCollection(characterId, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, callback)

Parameters

ParameterTagsDescription
characterIdRequiredThe character id.
collaboratorsOptionalReturn only comics in which the specified creators worked together (for example in which BOTH Stan Lee and Jack Kirby did work).
creatorsOptionalReturn only comics which feature work by the specified creators (accepts a comma-separated list of ids).
dateDescriptorOptionalReturn comics within a predefined date range.
dateRangeOptionalReturn comics within a predefined date range. Dates must be specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably formatted as YYYY-MM-DD but may be sent as any common date format.
diamondCodeOptionalFilter by diamond code.
digitalIdOptionalFilter by digital comic id.
eanOptionalFilter by EAN.
eventsOptionalReturn only comics which take place in the specified events (accepts a comma-separated list of ids).
formatOptional DefaultValueFilter by the issue format (e.g. comic, digital comic, hardcover). (Acceptable values are: "comic", "magazine", "trade paperback", "hardcover", "digest", "graphic novel", "digital comic", "infinite comic")
formatTypeOptionalFilter by the issue format type (comic or collection).
hasDigitalIssueOptional DefaultValueInclude only results which are available digitally. (Acceptable values are: "true")
isbnOptionalFilter by ISBN.
issnOptionalFilter by ISSN.
issueNumberOptionalReturn only issues in series whose issue number matches the input.
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only comics which have been modified since the specified date.
noVariantsOptional DefaultValueExclude variant comics from the result set. (Acceptable values are: "true")
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "focDate", "onsaleDate", "title", "issueNumber", "modified", "-focDate", "-onsaleDate", "-title", "-issueNumber", "-modified")
seriesOptionalReturn only comics which are part of the specified series (accepts a comma-separated list of ids).
sharedAppearancesOptionalReturn only comics in which the specified characters appear together (for example in which BOTH Spider-Man and Wolverine appear).
startYearOptionalReturn only issues in series whose start year matches the input.
storiesOptionalReturn only comics which contain the specified stories (accepts a comma-separated list of ids).
titleOptionalReturn only issues in series whose title matches the input.
titleStartsWithOptionalReturn only issues in series whose title starts with the input.
upcOptionalFilter by UPC.

Example Usage

    var characterId = 'characterId';
    var collaborators = 'collaborators';
    var creators = 'creators';
    var dateDescriptor = Object.keys(dateDescriptor)[0];
    var dateRange = 'dateRange';
    var diamondCode = 'diamondCode';
    var digitalId = 'digitalId';
    var ean = 'ean';
    var events = 'events';
    var format = 'format';
    var formatType = Object.keys(formatType)[0];
    var hasDigitalIssue = 'hasDigitalIssue';
    var isbn = 'isbn';
    var issn = 'issn';
    var issueNumber = 'issueNumber';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var noVariants = 'noVariants';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var sharedAppearances = 'sharedAppearances';
    var startYear = 'startYear';
    var stories = 'stories';
    var title = 'title';
    var titleStartsWith = 'titleStartsWith';
    var upc = 'upc';

    controller.getComicsCharacterCollection(characterId, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getComicsCollection

Fetches lists of comics.

function getComicsCollection(characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, callback)

Parameters

ParameterTagsDescription
charactersOptionalReturn only comics which feature the specified characters (accepts a comma-separated list of ids).
collaboratorsOptionalReturn only comics in which the specified creators worked together (for example in which BOTH Stan Lee and Jack Kirby did work). Accepts a comma-separated list of ids.
creatorsOptionalReturn only comics which feature work by the specified creators (accepts a comma-separated list of ids).
dateDescriptorOptionalReturn comics within a predefined date range.
dateRangeOptionalReturn comics within a predefined date range. Dates must be specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably formatted as YYYY-MM-DD but may be sent as any common date format.
diamondCodeOptionalFilter by diamond code.
digitalIdOptionalFilter by digital comic id.
eanOptionalFilter by EAN.
eventsOptionalReturn only comics which take place in the specified events (accepts a comma-separated list of ids).
formatOptional DefaultValueFilter by the issue format (e.g. comic, digital comic, hardcover). (Acceptable values are: "comic", "magazine", "trade paperback", "hardcover", "digest", "graphic novel", "digital comic", "infinite comic")
formatTypeOptionalFilter by the issue format type (comic or collection).
hasDigitalIssueOptional DefaultValueInclude only results which are available digitally. (Acceptable values are: "true")
isbnOptionalFilter by ISBN.
issnOptionalFilter by ISSN.
issueNumberOptionalReturn only issues in series whose issue number matches the input.
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only comics which have been modified since the specified date.
noVariantsOptional DefaultValueExclude variants (alternate covers, secondary printings, director's cuts, etc.) from the result set. (Acceptable values are: "true")
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "focDate", "onsaleDate", "title", "issueNumber", "modified", "-focDate", "-onsaleDate", "-title", "-issueNumber", "-modified")
seriesOptionalReturn only comics which are part of the specified series (accepts a comma-separated list of ids).
sharedAppearancesOptionalReturn only comics in which the specified characters appear together (for example in which BOTH Spider-Man and Wolverine appear). Accepts a comma-separated list of ids.
startYearOptionalReturn only issues in series whose start year matches the input.
storiesOptionalReturn only comics which contain the specified stories (accepts a comma-separated list of ids).
titleOptionalReturn only issues in series whose title matches the input.
titleStartsWithOptionalReturn only issues in series whose title starts with the input.
upcOptionalFilter by UPC.

Example Usage

    var characters = 'characters';
    var collaborators = 'collaborators';
    var creators = 'creators';
    var dateDescriptor = Object.keys(dateDescriptor)[0];
    var dateRange = 'dateRange';
    var diamondCode = 'diamondCode';
    var digitalId = 'digitalId';
    var ean = 'ean';
    var events = 'events';
    var format = 'format';
    var formatType = Object.keys(formatType)[0];
    var hasDigitalIssue = 'hasDigitalIssue';
    var isbn = 'isbn';
    var issn = 'issn';
    var issueNumber = 'issueNumber';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var noVariants = 'noVariants';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var sharedAppearances = 'sharedAppearances';
    var startYear = 'startYear';
    var stories = 'stories';
    var title = 'title';
    var titleStartsWith = 'titleStartsWith';
    var upc = 'upc';

    controller.getComicsCollection(characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getComicIndividual

Fetches a single comic by id.

function getComicIndividual(comicId, callback)

Parameters

ParameterTagsDescription
comicIdRequiredA single comic.

Example Usage

    var comicId = 'comicId';

    controller.getComicIndividual(comicId, function(error, response, context) {

    
    });

Errors

Error CodeError Description
404Comic not found.

Method: getComicsCollectionByCreatorId

Fetches lists of comics filtered by a creator id.

function getComicsCollectionByCreatorId(creatorId, characters, collaborators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, callback)

Parameters

ParameterTagsDescription
creatorIdRequiredThe creator ID.
charactersOptionalReturn only comics which feature the specified characters (accepts a comma-separated list of ids).
collaboratorsOptionalReturn only comics in which the specified creators worked together (for example in which BOTH Stan Lee and Jack Kirby did work).
dateDescriptorOptionalReturn comics within a predefined date range.
dateRangeOptionalReturn comics within a predefined date range. Dates must be specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably formatted as YYYY-MM-DD but may be sent as any common date format.
diamondCodeOptionalFilter by diamond code.
digitalIdOptionalFilter by digital comic id.
eanOptionalFilter by EAN.
eventsOptionalReturn only comics which take place in the specified events (accepts a comma-separated list of ids).
formatOptional DefaultValueFilter by the issue format (e.g. comic, digital comic, hardcover). (Acceptable values are: "comic", "magazine", "trade paperback", "hardcover", "digest", "graphic novel", "digital comic", "infinite comic")
formatTypeOptionalFilter by the issue format type (comic or collection).
hasDigitalIssueOptional DefaultValueInclude only results which are available digitally. (Acceptable values are: "true")
isbnOptionalFilter by ISBN.
issnOptionalFilter by ISSN.
issueNumberOptionalReturn only issues in series whose issue number matches the input.
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only comics which have been modified since the specified date.
noVariantsOptional DefaultValueExclude variant comics from the result set. (Acceptable values are: "true")
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "focDate", "onsaleDate", "title", "issueNumber", "modified", "-focDate", "-onsaleDate", "-title", "-issueNumber", "-modified")
seriesOptionalReturn only comics which are part of the specified series (accepts a comma-separated list of ids).
sharedAppearancesOptionalReturn only comics in which the specified characters appear together (for example in which BOTH Spider-Man and Wolverine appear).
startYearOptionalReturn only issues in series whose start year matches the input.
storiesOptionalReturn only comics which contain the specified stories (accepts a comma-separated list of ids).
titleOptionalReturn only issues in series whose title matches the input.
titleStartsWithOptionalReturn only issues in series whose title starts with the input.
upcOptionalFilter by UPC.

Example Usage

    var creatorId = 'creatorId';
    var characters = 'characters';
    var collaborators = 'collaborators';
    var dateDescriptor = Object.keys(dateDescriptor)[0];
    var dateRange = 'dateRange';
    var diamondCode = 'diamondCode';
    var digitalId = 'digitalId';
    var ean = 'ean';
    var events = 'events';
    var format = 'format';
    var formatType = Object.keys(formatType)[0];
    var hasDigitalIssue = 'hasDigitalIssue';
    var isbn = 'isbn';
    var issn = 'issn';
    var issueNumber = 'issueNumber';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var noVariants = 'noVariants';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var sharedAppearances = 'sharedAppearances';
    var startYear = 'startYear';
    var stories = 'stories';
    var title = 'title';
    var titleStartsWith = 'titleStartsWith';
    var upc = 'upc';

    controller.getComicsCollectionByCreatorId(creatorId, characters, collaborators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getComicsCollectionByEventId

Fetches lists of comics filtered by an event id.

function getComicsCollectionByEventId(eventId, characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, callback)

Parameters

ParameterTagsDescription
eventIdRequiredThe event id.
charactersOptionalReturn only comics which feature the specified characters (accepts a comma-separated list of ids).
collaboratorsOptionalReturn only comics in which the specified creators worked together (for example in which BOTH Stan Lee and Jack Kirby did work).
creatorsOptionalReturn only comics which feature work by the specified creators (accepts a comma-separated list of ids).
dateDescriptorOptionalReturn comics within a predefined date range.
dateRangeOptionalReturn comics within a predefined date range. Dates must be specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably formatted as YYYY-MM-DD but may be sent as any common date format.
diamondCodeOptionalFilter by diamond code.
digitalIdOptionalFilter by digital comic id.
eanOptionalFilter by EAN.
eventsOptionalReturn only comics which take place in the specified events (accepts a comma-separated list of ids).
formatOptional DefaultValueFilter by the issue format (e.g. comic, digital comic, hardcover). (Acceptable values are: "comic", "magazine", "trade paperback", "hardcover", "digest", "graphic novel", "digital comic", "infinite comic")
formatTypeOptionalFilter by the issue format type (comic or collection).
hasDigitalIssueOptional DefaultValueInclude only results which are available digitally. (Acceptable values are: "true")
isbnOptionalFilter by ISBN.
issnOptionalFilter by ISSN.
issueNumberOptionalReturn only issues in series whose issue number matches the input.
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only comics which have been modified since the specified date.
noVariantsOptional DefaultValueExclude variant comics from the result set. (Acceptable values are: "true")
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "focDate", "onsaleDate", "title", "issueNumber", "modified", "-focDate", "-onsaleDate", "-title", "-issueNumber", "-modified")
seriesOptionalReturn only comics which are part of the specified series (accepts a comma-separated list of ids).
sharedAppearancesOptionalReturn only comics in which the specified characters appear together (for example in which BOTH Spider-Man and Wolverine appear).
startYearOptionalReturn only issues in series whose start year matches the input.
storiesOptionalReturn only comics which contain the specified stories (accepts a comma-separated list of ids).
titleOptionalReturn only issues in series whose title matches the input.
titleStartsWithOptionalReturn only issues in series whose title starts with the input.
upcOptionalFilter by UPC.

Example Usage

    var eventId = 'eventId';
    var characters = 'characters';
    var collaborators = 'collaborators';
    var creators = 'creators';
    var dateDescriptor = Object.keys(dateDescriptor)[0];
    var dateRange = 'dateRange';
    var diamondCode = 'diamondCode';
    var digitalId = 'digitalId';
    var ean = 'ean';
    var events = 'events';
    var format = 'format';
    var formatType = Object.keys(formatType)[0];
    var hasDigitalIssue = 'hasDigitalIssue';
    var isbn = 'isbn';
    var issn = 'issn';
    var issueNumber = 'issueNumber';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var noVariants = 'noVariants';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var sharedAppearances = 'sharedAppearances';
    var startYear = 'startYear';
    var stories = 'stories';
    var title = 'title';
    var titleStartsWith = 'titleStartsWith';
    var upc = 'upc';

    controller.getComicsCollectionByEventId(eventId, characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, stories, title, titleStartsWith, upc, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getComicsCollectionBySeriesId

Fetches lists of comics filtered by a series id.

function getComicsCollectionBySeriesId(seriesId, characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, sharedAppearances, startYear, stories, title, titleStartsWith, upc, callback)

Parameters

ParameterTagsDescription
seriesIdRequiredThe series ID.
charactersOptionalReturn only comics which feature the specified characters (accepts a comma-separated list of ids).
collaboratorsOptionalReturn only comics in which the specified creators worked together (for example in which BOTH Stan Lee and Jack Kirby did work).
creatorsOptionalReturn only comics which feature work by the specified creators (accepts a comma-separated list of ids).
dateDescriptorOptionalReturn comics within a predefined date range.
dateRangeOptionalReturn comics within a predefined date range. Dates must be specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably formatted as YYYY-MM-DD but may be sent as any common date format.
diamondCodeOptionalFilter by diamond code.
digitalIdOptionalFilter by digital comic id.
eanOptionalFilter by EAN.
eventsOptionalReturn only comics which take place in the specified events (accepts a comma-separated list of ids).
formatOptional DefaultValueFilter by the issue format (e.g. comic, digital comic, hardcover). (Acceptable values are: "comic", "magazine", "trade paperback", "hardcover", "digest", "graphic novel", "digital comic", "infinite comic")
formatTypeOptionalFilter by the issue format type (comic or collection).
hasDigitalIssueOptional DefaultValueInclude only results which are available digitally. (Acceptable values are: "true")
isbnOptionalFilter by ISBN.
issnOptionalFilter by ISSN.
issueNumberOptionalReturn only issues in series whose issue number matches the input.
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only comics which have been modified since the specified date.
noVariantsOptional DefaultValueExclude variant comics from the result set. (Acceptable values are: "true")
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "focDate", "onsaleDate", "title", "issueNumber", "modified", "-focDate", "-onsaleDate", "-title", "-issueNumber", "-modified")
sharedAppearancesOptionalReturn only comics in which the specified characters appear together (for example in which BOTH Spider-Man and Wolverine appear).
startYearOptionalReturn only issues in series whose start year matches the input.
storiesOptionalReturn only comics which contain the specified stories (accepts a comma-separated list of ids).
titleOptionalReturn only issues in series whose title matches the input.
titleStartsWithOptionalReturn only issues in series whose title starts with the input.
upcOptionalFilter by UPC.

Example Usage

    var seriesId = 'seriesId';
    var characters = 'characters';
    var collaborators = 'collaborators';
    var creators = 'creators';
    var dateDescriptor = Object.keys(dateDescriptor)[0];
    var dateRange = 'dateRange';
    var diamondCode = 'diamondCode';
    var digitalId = 'digitalId';
    var ean = 'ean';
    var events = 'events';
    var format = 'format';
    var formatType = Object.keys(formatType)[0];
    var hasDigitalIssue = 'hasDigitalIssue';
    var isbn = 'isbn';
    var issn = 'issn';
    var issueNumber = 'issueNumber';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var noVariants = 'noVariants';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var sharedAppearances = 'sharedAppearances';
    var startYear = 'startYear';
    var stories = 'stories';
    var title = 'title';
    var titleStartsWith = 'titleStartsWith';
    var upc = 'upc';

    controller.getComicsCollectionBySeriesId(seriesId, characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, sharedAppearances, startYear, stories, title, titleStartsWith, upc, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getComicsCollectionByStoryId

Fetches lists of comics filtered by a story id.

function getComicsCollectionByStoryId(storyId, characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, title, titleStartsWith, upc, callback)

Parameters

ParameterTagsDescription
storyIdRequiredThe story ID.
charactersOptionalReturn only comics which feature the specified characters (accepts a comma-separated list of ids).
collaboratorsOptionalReturn only comics in which the specified creators worked together (for example in which BOTH Stan Lee and Jack Kirby did work).
creatorsOptionalReturn only comics which feature work by the specified creators (accepts a comma-separated list of ids).
dateDescriptorOptionalReturn comics within a predefined date range.
dateRangeOptionalReturn comics within a predefined date range. Dates must be specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably formatted as YYYY-MM-DD but may be sent as any common date format.
diamondCodeOptionalFilter by diamond code.
digitalIdOptionalFilter by digital comic id.
eanOptionalFilter by EAN.
eventsOptionalReturn only comics which take place in the specified events (accepts a comma-separated list of ids).
formatOptional DefaultValueFilter by the issue format (e.g. comic, digital comic, hardcover). (Acceptable values are: "comic", "magazine", "trade paperback", "hardcover", "digest", "graphic novel", "digital comic", "infinite comic")
formatTypeOptionalFilter by the issue format type (comic or collection).
hasDigitalIssueOptional DefaultValueInclude only results which are available digitally. (Acceptable values are: "true")
isbnOptionalFilter by ISBN.
issnOptionalFilter by ISSN.
issueNumberOptionalReturn only issues in series whose issue number matches the input.
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only comics which have been modified since the specified date.
noVariantsOptional DefaultValueExclude variant comics from the result set. (Acceptable values are: "true")
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "focDate", "onsaleDate", "title", "issueNumber", "modified", "-focDate", "-onsaleDate", "-title", "-issueNumber", "-modified")
seriesOptionalReturn only comics which are part of the specified series (accepts a comma-separated list of ids).
sharedAppearancesOptionalReturn only comics in which the specified characters appear together (for example in which BOTH Spider-Man and Wolverine appear).
startYearOptionalReturn only issues in series whose start year matches the input.
titleOptionalReturn only issues in series whose title matches the input.
titleStartsWithOptionalReturn only issues in series whose title starts with the input.
upcOptionalFilter by UPC.

Example Usage

    var storyId = 'storyId';
    var characters = 'characters';
    var collaborators = 'collaborators';
    var creators = 'creators';
    var dateDescriptor = Object.keys(dateDescriptor)[0];
    var dateRange = 'dateRange';
    var diamondCode = 'diamondCode';
    var digitalId = 'digitalId';
    var ean = 'ean';
    var events = 'events';
    var format = 'format';
    var formatType = Object.keys(formatType)[0];
    var hasDigitalIssue = 'hasDigitalIssue';
    var isbn = 'isbn';
    var issn = 'issn';
    var issueNumber = 'issueNumber';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var noVariants = 'noVariants';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var sharedAppearances = 'sharedAppearances';
    var startYear = 'startYear';
    var title = 'title';
    var titleStartsWith = 'titleStartsWith';
    var upc = 'upc';

    controller.getComicsCollectionByStoryId(storyId, characters, collaborators, creators, dateDescriptor, dateRange, diamondCode, digitalId, ean, events, format, formatType, hasDigitalIssue, isbn, issn, issueNumber, limit, modifiedSince, noVariants, offset, orderBy, series, sharedAppearances, startYear, title, titleStartsWith, upc, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Back to List of Controllers

Class: EventsController

Get singleton instance

The singleton instance of the EventsController class can be accessed from the API Client.

var controller = lib.EventsController;

Method: getCharacterEventsCollection

Fetches lists of events filtered by a character id.

function getCharacterEventsCollection(characterId, comics, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
characterIdRequiredThe character ID.
comicsOptionalReturn only events which take place in the specified comics (accepts a comma-separated list of ids).
creatorsOptionalReturn only events which feature work by the specified creators (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only events which have been modified since the specified date.
nameOptionalFilter the event list by name.
nameStartsWithOptionalReturn events with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "startDate", "modified", "-name", "-startDate", "-modified")
seriesOptionalReturn only events which are part of the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only events which contain the specified stories (accepts a comma-separated list of ids).

Example Usage

    var characterId = 'characterId';
    var comics = 'comics';
    var creators = 'creators';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getCharacterEventsCollection(characterId, comics, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getIssueEventsCollection

Fetches lists of events filtered by a comic id.

function getIssueEventsCollection(comicId, characters, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
comicIdRequiredThe comic ID.
charactersOptionalReturn only events which feature the specified characters (accepts a comma-separated list of ids).
creatorsOptionalReturn only events which feature work by the specified creators (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only events which have been modified since the specified date.
nameOptionalFilter the event list by name.
nameStartsWithOptionalReturn events with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "startDate", "modified", "-name", "-startDate", "-modified")
seriesOptionalReturn only events which are part of the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only events which contain the specified stories (accepts a comma-separated list of ids).

Example Usage

    var comicId = 'comicId';
    var characters = 'characters';
    var creators = 'creators';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getIssueEventsCollection(comicId, characters, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getCreatorEventsCollection

Fetches lists of events filtered by a creator id.

function getCreatorEventsCollection(creatorId, characters, comics, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
creatorIdRequiredThe creator ID.
charactersOptionalReturn only events which feature the specified characters (accepts a comma-separated list of ids).
comicsOptionalReturn only events which take place in the specified comics (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only events which have been modified since the specified date.
nameOptionalFilter the event list by name.
nameStartsWithOptionalReturn events with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "startDate", "modified", "-name", "-startDate", "-modified")
seriesOptionalReturn only events which are part of the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only events which contain the specified stories (accepts a comma-separated list of ids).

Example Usage

    var creatorId = 'creatorId';
    var characters = 'characters';
    var comics = 'comics';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getCreatorEventsCollection(creatorId, characters, comics, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getEventsCollection

Fetches lists of events.

function getEventsCollection(characters, comics, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, callback)

Parameters

ParameterTagsDescription
charactersOptionalReturn only events which feature the specified characters (accepts a comma-separated list of ids).
comicsOptionalReturn only events which take place in the specified comics (accepts a comma-separated list of ids).
creatorsOptionalReturn only events which feature work by the specified creators (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only events which have been modified since the specified date.
nameOptionalReturn only events which match the specified name.
nameStartsWithOptionalReturn events with names that begin with the specified string (e.g. Sp).
offsetOptionalSkip the specified number of resources in the result set.
orderByOptional DefaultValueOrder the result set by a field or fields. Add a "-" to the value sort in descending order. Multiple values are given priority in the order in which they are passed. (Acceptable values are: "name", "startDate", "modified", "-name", "-startDate", "-modified")
seriesOptionalReturn only events which are part of the specified series (accepts a comma-separated list of ids).
storiesOptionalReturn only events which take place in the specified stories (accepts a comma-separated list of ids).

Example Usage

    var characters = 'characters';
    var comics = 'comics';
    var creators = 'creators';
    var limit = 'limit';
    var modifiedSince = 'modifiedSince';
    var name = 'name';
    var nameStartsWith = 'nameStartsWith';
    var offset = 'offset';
    var orderBy = 'orderBy';
    var series = 'series';
    var stories = 'stories';

    controller.getEventsCollection(characters, comics, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, series, stories, function(error, response, context) {

    
    });

Errors

Error CodeError Description
409Limit greater than 100.

Method: getEventIndividual

Fetches a single event by id.

function getEventIndividual(eventId, callback)

Parameters

ParameterTagsDescription
eventIdRequiredA single event.

Example Usage

    var eventId = 'eventId';

    controller.getEventIndividual(eventId, function(error, response, context) {

    
    });

Errors

Error CodeError Description
404Event not found.

Method: getEventsCollectionBySeriesId

Fetches lists of events filtered by a series id.

function getEventsCollectionBySeriesId(seriesId, characters, comics, creators, limit, modifiedSince, name, nameStartsWith, offset, orderBy, stories, callback)

Parameters

ParameterTagsDescription
seriesIdRequiredThe series ID.
charactersOptionalReturn only events which feature the specified characters (accepts a comma-separated list of ids).
comicsOptionalReturn only events which take place in the specified comics (accepts a comma-separated list of ids).
creatorsOptionalReturn only events which feature work by the specified creators (accepts a comma-separated list of ids).
limitOptionalLimit the result set to the specified number of resources.
modifiedSinceOptionalReturn only events which have been modified since the specified date.
name` Optional `