splinterlands-web-api v1.0.11
Splinterlands Web API
Web package for the Splinterlands API.
Has common API calls and simple methods to obtain images from Splinterlands, such as cards, rulesets, and abilities.
Installing
npm i splinterlands-web-api
Documentation
API calls
These are the current api calls that are supported.
Splinterlands
getSettings()
Player
getPlayerQuest(username)
getPlayerDetails(username)
getPlayerCollectionCards(username)
Cards
getAllCardDetails()
getCardDetailsFromUid([cardId1, cardId2])
Battle
getPlayerBattles(username, /*optional*/ format)
getSingleBattle(battleId)
getOutstandingMatch(username, accessToken)
Market
Rental
getForRentCardSummary()
getForRentByCard(cardId, edition, isGold)
getActiveRentals(username)
For Sale
getForSaleGrouped()
getForSaleByCard(cardId, edition, isGold)
Images
Current images urls that can be requested are
Card
Base card
A base card url which has no stats can be requested as follows
getCardImageBaseById(cardId, /* optional */ isGold, /* optional */ edition)
If isGold is not specified, the card will be standard foil. If edition is not specified, the image returned will be the latest edition. For Example getCardImageBaseById(/* cardId */ 13)
would return
To request the gold foil alpha version
getCardImageBaseById(cardId, /* isGold */ true, /* edition */ 0)
Detailed card
A detailed card url which includes stats at each level can be requested as such
getCardImageLevelById(cardId, level, /* optional */ isGold, /* optional */ edition)
Again, if the optional parameters are not provided, the card will latest edition and standard foil.
For example getCardImageLevelById(/* cardId */ 13, /* level */ 5)
will return
To request the gold foil alpha version
getCardImageLevelById(/* cardId */ 13, /* level */ 5, /* isGold */ true, /* edition */ 0)
Ability
You can request an ability image in two ways, using the ABILITY_IMAGE
object, or calling getAbilityImage(abilityName)
For example both
ABILITY_IMAGE.TANK_HEAL
getAbilityImage('Tank Heal')
Will return
Ruleset
You can request rulesets in two ways, using the RULESET_IMAGE
object, or calling getRulesetImage(rulesetName)
For example both
RULESET_IMAGE.BACK_TO_BASICS
getRulesetImage('Back to Basics')
Will return
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago