comichron-data-browser-client

2.0.0 • Public • Published

comichron-data/browser-client

xhr-based client for https://github.com/comichron-data/api

Install

npm install comichron-data-browser-client --save

Usage

See demo entry file for usage examples.

API

var client = require('comichron-data-browser-client');

client.titles(callback)

Get titles of all comics that have data in the api.

  • callback - function with signature function(error, titles) where error is non-null if there was a failure. On success, error will be null and titles will be json of the titles response.

client.byMonth(id, callback)

Get a comic's by-month data.

  • id - Comic id from titles response
  • callback - function with signature function(error, data) where error is non-null if there was a failure. On success, error will be null and data will be json of the by-month response.

client.byIssue(id, callback)

Get a comic's by-issue data.

  • id - Comic id from titles response
  • callback - function with signature function(error, data) where error is non-null if there was a failure. On success, error will be null and data will be json of the by-issue response.

client.sourceData(year, month, callback)

Get source data for a specific year/month.

  • year - 4 digit year. String or Number.
  • month - 1 or 2 digit month. January is 1. String or Number.
  • callback - function with signature function(error, records) where error is non-null if there was a failure. On success, error will be null and records will be json of the source data response.

License

MIT

Package Sidebar

Install

npm i comichron-data-browser-client

Weekly Downloads

2

Version

2.0.0

License

MIT

Last publish

Collaborators

  • psalaets