Unofficial Splinterlands API Documentation
One thing that makes Splinterlands such a great game is the environment that exists around it. There's a whole ecosystem of tools and websites that you can use to enhance your Splinterlands experience. Just to name a few: Splintertalk, Peakmonsters, Monster Market, Splintercards, Reward Cards Stats, etc ...
While I'm certainly not a pro developer, I like to program in my spare time. As such, I thought it would be a fun challenge to try and develop some some tools for Splinterlands. In order to do so, you need to know a programming language like JavaScript or PHP.
Next up, you need a way to communicate with the game. This is usually done through an API (Application Programming Interface). This allows a 3th party tool to request and send data to Splinterlands. In the case of Splinterlands, it's also possible to directly extract data from the Hive Blockchain. Now, for most other games or services that provide an API, they also have extensive documentation as to how you can use the API. That must also be the case for Splinterlands, right?
Alas, no. It's nowhere to be found. That's a bummer, because without any documentation it's really hard to figure out how to get things done. After doing some research I found a user who had compilied some information 2 years ago in a Google Sheets and about 1 year ago @Kiokizz bundled some information on Github. That's it. Offcourse, there's also a helpfull channel for developers on the Splinterlands Discord, but information does get lost get quickly in there.
Another possibility is to use the developer tools in your browser to look at what API calls Splinterlands itself and other 3th party websites like Peakmonsters are making. By looking at those websites you can allready learn a lot about how the API works.
Well, let me tell you. I've been through all of this pain and do not wish it upon anyone else. Therefore I've decided to bundle all of the Splinterlands API information that I found in one central place, which can be found here: https://splinterviewer.com/api. For this, I used the Github by Kiokizz as the basis and updated things that are no longer working and added a lot of new stuff as well.
On this website I will try to keep a record of the Unofficial Splinterlands API Documentation, so that developers have an easy one-stop shop for everything related to Splinterlands development. Right now, this documentation is allready a lot more extensive than anything else out there, but I'm still looking to improve it. So if you have any recommendations for the website, don't hesitate to reach out.
The documentation contains an overview of all API endpoints and what JSON response you can expect. This data can be used to build your own tools. In the future I might consider adding some simple tutorials as well.
If this is a project that you would like to support, feel free to donate.
I'm also tagging the lovely people over at @monster-curator (@flauwy, @abrockman, @marianaemilia, @r1s2g3, @homesteadhacker, @RosieW and @CandyRain), so hopefully this documentation can get some attention. That would certainly help a lot of aspiring Splinterlands developers leading to new tools for everyone. I think that's a cause we can all stand behind!
So feel free to head over to https://splinterviewer.com/api and have a look.
Looks good 👍. Something that'd be nice as a next step would be to have an interacted test widget to let people try out the API points with the optional parameters, and preview the response.
Congratulations @solaito! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :
Your next target is to reach 700 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out the last post from @hivebuzz:
Awesome work, I have forwarded this to our developer who is just getting started looking into the API.
Posted Using LeoFinance Beta
That looks really handy for developers.
I hope you decide to do some tutorials at some point. it would be fun to learn how to make the code work. 😁
!LUV !PIZZA
Posted Using LeoFinance Beta
<><
@solaito, you've been given LUV from @gillianpearce.
Check the LUV in your H-E wallet. (4/10)
Error 404 :(
Posted using Splintertalk
PIZZA Holders sent $PIZZA tips in this post's comments:
@gillianpearce(5/10) tipped @solaito (x1)
Learn more at https://hive.pizza.