So, your interested in the official CubeScript API endpoint at /api ?
Well, you've come to the right place!
On this page, we will take you over the available features of this endpoint
We will also show you how to use it in your own projects
whether it being a website, or a discord bot. We've got you covered!
There are a few endpoints available
Here is a list of them:
- /api
- /api/commands
- /api/updates
- /api/latest
Each of these endpoints have their own use
/api
is the main directory for all endpoints in the list/api/commands
this endpoint returns all available commands for the api endpoint in json format/api/updates
this endpoint returns all available Versions of the CSVM transpiler in json format/api/latest
this endpoint returns only the latest version of the CSVM transpiler in json formatNow that you know what each endpoint does, lets get into how to use them
First, lets start with the main endpoint, /api
This endpoint is the main directory for all other endpoints, not really of much use here, unless you want to mention the fact that if you use this endpoint, it just returns all The endpoint folders within the directory of /api so that the ones not listed here can still be used
Next, lets move onto /api/commands
this endpoint returns all availabe endpoints that are supported by CubeScript and the maintainers of the Website
Now, noting back when i said that /api did this?
that one returns all the endpoints including the paths, plus the in development ones that arent truly tested
but this one only returns the ones that are tested and ready to be used in consumer / developer projects
Next, lets move onto /api/updates
this endpoint returns all available versions of the CSVM transpiler in json format
when using this one, you need to provide a ?query=[number] at the end of the url
make sure to replace [number] with a value starting from 1
soon there should be a endpoint that returns the total id number for all available updates that you can GET request on
Next, lets move onto /api/latest
this endpoint returns only the latest version of the CSVM transpiler in json format
no need to do the whole ?query thing on it, just use it as is
this one returns the latest version of the compiler, so you could kind of just farm this for the id number and use that.
but i wouldnt recommend it, as it would be a waste of resources. then again you could grab the id number while also showing the latest updates.
but thats up to you