Skip to content

hearthstone api conveniently turned into an sql db by XIV.

Notifications You must be signed in to change notification settings

angusjfleming/hearthstone-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hearthstone-sql

npm

Data fetched from http://hearthstoneapi.com. Data will be stored locally in the same manner as the database is.

Now dynamically builds (playable) card list, and now the package should be evergreen in that it will require no further maintenance from myself.

Install

Install the package from npm:

npm install hearthstonejson

fetchdata()

Function that takes an api key from http://hearthstoneapi.com/ and fetches current card lists.

importcards()

Promise that returns true when it has added all cards from the fetched json to the sql db.

exports.dbpath

The absolute path to the sqlite file for easy use in other files. Will not reference anything if you have never fetched any data.

exports.jsonpath

The absolute path to the json file for easy use in other files. Will not reference anything if you have never fetched any data.

Example

var hssql = require("hearthstone-sql")

hssql.fetchdata(mashapekey)
.then(() => {
hssql.importcards()
})

About

hearthstone api conveniently turned into an sql db by XIV.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published