Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

node-api-iceandfire

About

Node module for interacting with An API of Ice and Fire.

More information available on Reddit.

Installation

npm install --save api-iceandfire

require('api-iceandfire')

Methods

All methods return promises for a JSON object.

  • get(type, index)
  • getBook(index)
  • getCharacter(index)
  • getHouse(index)

Conforms to data caching guidelines via etag method.

Example

var iaf = require('api-iceandfire')

iaf.getBook(1).then(book => console.dir(book))

/*
{ url: 'http://www.anapioficeandfire.com/api/books/1',
  name: 'A Game of Thrones',
  isbn: '978-0553103540',
  authors: [ 'George R. R. Martin' ],
  numberOfPages: 694,
  publisher: 'Bantam Books',
  country: 'United States',
  mediaType: 'Hardcover',
  released: '1996-08-01T00:00:00',
  characters:
   [ 'http://www.anapioficeandfire.com/api/characters/2',
     'http://www.anapioficeandfire.com/api/characters/12',
     'http://www.anapioficeandfire.com/api/characters/13',
	 ...
*/

TODO

  • API versioning support
  • getAllX methods

About

No description, website, or topics provided.

Resources

License

Releases

No releases published

Packages

No packages published