Skip to content

aiwebb/node-api-iceandfire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published