overwolf.games.launchers.events API
Returns an object with launcher related events and info-updates (Currently supported only for the League of Legends Launcher).
Methods Reference
Events Reference
Types Reference
- overwolf.games.launchers.events.SetRequiredFeaturesResult Object
- overwolf.games.launchers.events.GetInfoResult Object
How to register for features
The Launcher Events Provider keeps an info DB with information about the launcher state.
Updates for these entries can be received as events by registering an event listener using overwolf.games.launchers.events.onInfoUpdates()
.
It is also possible to get the currently available information using overwolf.games.launchers.events.getInfo()
.
setRequiredFeatures(launcherClassId, features, callback)
Version added: 0.126
Sets the required features from the provider.
Parameter | Type | Description |
---|---|---|
launcherClassId | int | Launcher ID of interest |
features | string | String array of features to utilize |
callback | (Result: SetRequiredFeaturesResult) => void | Returns with the result |
getInfo(launcherClassId, callback)
Version added: 0.126
Gets the current information for a given launcher id.
Parameter | Type | Description |
---|---|---|
launcherClassId | int | The launcher Id of interest |
callback | (Result: GetInfoResult) => void | Returns with the result |
onInfoUpdates
Version added: 0.78
Fired when there are game info updates with a JSON object of the updates.
onNewEvents
Version added: 0.78
Fired when there are new game events with a JSON object of the events.
SetRequiredFeaturesResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | |
error | string | null if success is true |
supportedFeatures | string[] | an array of supported features |
Example data: Success
{"success": true, "supportedFeatures": Array[1])}
GetInfoResult Object
Parameter | Type | Description |
---|---|---|
success | boolean | |
error | string | null if success is true |
res | object | Provides the current game info |
Example data: Success
{
"success":true,
"res":{
"game_flow":{
"phase":"None"
},
"summoner_info":{
"account_id":"224346939",
"display_name":"itaygl",
"internal_name":"itaygl",
"profile_icon_id":"3902",
"summoner_id":"79489298",
"summoner_level":"31"
},
"game_info": {
"close_client_during_game": "0"
},
"credentials": {
"token": "cmlvdDpxb2hlamFqeHRzRUI4dGw1TUljSmJR",
"port": "65038"
}
}
}
Example data: Failure
{
"success": false,
"error": "Launcher isn't running or the associated game isn't running"
}