comichron-data-browser-client
v2.0.0
Published
xhr-based client for https://github.com/comichron-data/api
Downloads
9
Maintainers
Readme
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)whereerroris non-nullif there was a failure. On success,errorwill benullandtitleswill 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)whereerroris non-nullif there was a failure. On success,errorwill benullanddatawill 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)whereerroris non-nullif there was a failure. On success,errorwill benullanddatawill 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)whereerroris non-nullif there was a failure. On success,errorwill benullandrecordswill be json of the source data response.
License
MIT
