Skip to content

intercaetera/nrdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nrdb

NPM module for asynchronously querying the public endpoints of the NetrunnerDB API.

NPM

Installation

npm install --save nrdb
// OR
yarn add nrdb

Example usage

var nrdb = require('nrdb')

// Print all cards on the latest MWL.
nrdb.mwl()
.then(data => {
  let cards = data[data.length-1].cards

  for(let each in cards) {
    nrdb.card(each)
    .then((data) => {
      let card = data[0]

      let mwlstars = (cards[each] === 3) ? "***" : "*"

      console.log(`${card.title} ${mwlstars}`)
    })
  }
})

Implemented routes

See docs for each of those in the NRDB API documentation

  • card(id)
  • cards
  • cycle(code)
  • cycles
  • decklist(id)
  • decklistByDate(date) (date is either a date string formatted with YYYY-MM-DD or a Date object)
  • faction(code)
  • factions
  • mwl
  • pack(code)
  • packs
  • prebuilts
  • side(code)
  • sides
  • type(code)
  • types

About

NPM module for querying the NetrunnerDB api.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published