xhr-based client for https://github.com/comichron-data/api
npm install comichron-data-browser-client --save
See demo entry file for usage examples.
var client = require('comichron-data-browser-client');
Get titles of all comics that have data in the api.
- callback - function with signature
function(error, titles)
whereerror
is non-null
if there was a failure. On success,error
will benull
andtitles
will be json of the titles response.
Get a comic's by-month data.
- id - Comic id from titles response
- callback - function with signature
function(error, data)
whereerror
is non-null
if there was a failure. On success,error
will benull
anddata
will be json of the by-month response.
Get a comic's by-issue data.
- id - Comic id from titles response
- callback - function with signature
function(error, data)
whereerror
is non-null
if there was a failure. On success,error
will benull
anddata
will be json of the by-issue response.
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)
whereerror
is non-null
if there was a failure. On success,error
will benull
andrecords
will be json of the source data response.
MIT