Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Package for the Splinterlands API. Typed responses

License

Notifications You must be signed in to change notification settings

thechungster/splinterlands-api

Repository files navigation

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.

NPM Package

Installing

npm i splinterlands-web-api

Documentation

API calls

These are the current api calls that are supported.

Splinterlands

Player

Cards

Battle

Market

Rental

For Sale

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

Base Image

To request the gold foil alpha version

  • getCardImageBaseById(cardId, /* isGold */ true, /* edition */ 0)

Gold foil alpha Image

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 Level 5 Spineback turtle

To request the gold foil alpha version

  • getCardImageLevelById(/* cardId */ 13, /* level */ 5, /* isGold */ true, /* edition */ 0)

Gold 5 Spineback turtle

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

Tank heal ability

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

Back to basics ruleset

About

Package for the Splinterlands API. Typed responses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published