What is an API?
API stands for Application Programming Interface. In simple terms, you can distract (GET) and sometimes enter (POST) data into a data source like a base. APIs are commonly used for interactions between 2 applications. 1 of those 2 applications often being a 3rd party application.
These 2 applications communicate through an HTTP call. Instead of applications using these HTML calls, any person can use these HTTP URLs to draw data from the Splinterlands API.
For example, if you want to know the balances of player kiokizz, you could use an URL to see that information: https://api.splinterlands.io/players/balances?username=kiokizz
The result would be a big string of information like the above example.
With a JSON formatter, you can make it look more readable. There are websites for JSON formatting, but it's also beneficial to use a browser extension (there are several good ones). Firefox even has one built-in.
The GitHub page of Kiokizz shows a good overview of the first Splinterlands API: https://github.com/kiokizz/Splinterlands-API
Another good resource is Swagger UI (splinterlands.com). This website shows all the possibilities of the second-generation API (api2) for Splinterlands.
Please sign in to leave a comment.