Skip to content

comichron-data/browser-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

xhr-based client for comichron-data/api

Resources

License

Stars

Watchers

Forks

Packages

No packages published