-
Notifications
You must be signed in to change notification settings - Fork 0
Custom API requests
Simón Olivo (Sarturo) edited this page Aug 2, 2020
·
7 revisions
In addition to the available functions, you can build your own GameJolt API request. You only need to know the endpoint and the necessary parameters. Remember that by default, the "game_id" parameter is already included in the request.
create_request(endpoint: String, params: Dictionary, options: Dictionary) -> GameJoltAPIRequest
Make a custom request to the GameJolt API
The path where you receive a resource or perform an action/feature provided by the GameJolt API.
The necessary parameters will depend on the service or resource to be requested.
-
'ssl': bool (optional) If SSL is enabled (set to
true
), API requests are made by using the HTTPS protocol. (Enabled by default).
-
api_request_completed(data: Array) Returns an array which include the following Dictionary element:
-
success: bool It will return
true
if the response is received and processed successfully. - [data]: Array The name of [data] will depend on the GameJolt API response. Depending on the API response it may contain an empty array, or contain more than one Dictionary element.
-
success: bool It will return
- api_request_failed(error: String) Returns an error message.
##Example