Game Jolt API for Godot
Wrapper for the Game Jolt API running through HTTP requests. It contains all Game Jolt API endpoints and aims to simplify its use where it's possible. Compatible with Godot 4.x. For the Godot 3.x version, see this branch.
For examples of use, see the documentation below. There's also an example scene in addons/gamejolt/example containing all endpoints and parameters on a graphical interface.
Documentation
The full documentation and reference is available here.
Initial Setup
- Enable the plugin on
Project Settings > Plugins - Set the game ID and private key to be able to perform API requests on
Project Settings > General > Game Jolt > Config > Global. - Optionally, you can set a default user name and token on
Project Settings > General > Game Jolt > Config > Debug.- Those properties will only be used as defaults on editor and debug builds, allowing easier testing and prototyping.
- On release builds you must set the user name and token manually. See General methods.
After this setup you can perform the API requests by using the methods below on the singleton GameJolt on your code.
Handling Request Responses
Each Game Jolt API method emits a signal after a request is completed, be it successful or not. You can connect specific signals to capture responses on method callbacks:
func _ready() -> void:
GameJolt.time_completed.connect(_on_GameJolt_time_completed)
GameJolt.time()
func _on_GameJolt_time_completed(result: Dictionary) -> void:
# Do something with the request result...
Or you can await the signal result in a variable:
func _onButtonTime_pressed() -> void:
GameJolt.time()
var result: Dictionary = await GameJolt.time_completed
# Do something with the request result...
Note: All signals return a response: Dictionary.
Changelog for version v0.0.8
No changelog provided for this version.