TIME TO GET STARTED!
Alright, it's time to show you some of the basic API call methods to get started!
Before starting using the WebAPI, we would recommend you to use an API program software to call APIs, we recommend the software Postman with its free plan to call APIs and see how are the call results, however, that's up to you.
For all Daztrax Studios' WebAPIs, the domain we use is and always will be "https://api.daztraxstudios.com/"
WARNING: This API is in an early stage and still in development, however, there's some methods that can be used without any restrictions for general use.
Let's make your first WebAPI calls!
All results for all WebAPIs will return as a JSON text
For your first WebAPI call, let's get the actual time when you make the call, so let's call the "Get server time" method, which is "DS/GetServerTime/v1", so let's add the complete URL to where you want to call the api, the URL for this call is "https://api.daztraxstudios.com/DS/GetServerTime/v1", since it's a method to get information, lets set this as a GET call method.
Once you call it, you will get a JSON text with the result status, and the unix value of the time in UTC.
This is an example of how your result will be:
{
"Result": "Success",
"UnixTimestamp": 1708467981
}
Perfect! You made your first WebAPI call using the Daztrax Studios WebAPI, but we're not done yet, you should know about the parameters on the WebAPI.
For this, lets get the information of the game LEZ and check if the game is online, when we say that the game is online we mean that it's available to play, the result can barely be different when calling this method, but the most important thing here is getting a successful result when calling the WebAPI.
Alright, now it's time to call the method "Get service info", there's other methods that has optional parameters, but this in specific have one required parameter to get a successful call, the URL for "Get service info" is "LEZ/GetServiceInfo/v1", and the complete URL for this method is "https://api.daztraxstudios.com/LEZ/GetServiceInfo/v1", now we have the complete URL, but a parameter is missing, which for this case is "Service". For start adding parameters, we need to use the question mark after the URL (?) and after the question mark, we need to add the name of the parameter name, which in this case is "Service", and the value for that parameter that we will use is going to be "Game", so the complete URL with the parameters is now "https://api.daztraxstudios.com/LEZ/GetServiceInfo/v1?Service=Game".
This is an example of how your results will be (We can ignore the value of "Status", since it may be different depending of how the development of LEZ is going, the most important values are "Result" and "Service"):
{
"Result": "Success",
"Service": "Game",
"Status": "Online"
}
You did it! You made the call with a parameter now, you should be ready to use the basic methods of the Daztrax Studios' WebAPI.