Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

api-iceandfire

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-iceandfire

## About

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 13 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts