overwolf.extensions API
Change or retrieve the information of an Overwolf app or respond to events in the app’s lifecycle.
Special Overwolf URLs
You can use the following helpful URLs to retrieve an extension file content or icons:
-
overwolf://extension-resources/<extension uid>/icon
A URL that can be used as a source for an IMG tag or a DIV background. This path will display the icon of the stated extension. -
overwolf://extension-resources/<extension uid>/icon_gray
A URL that can be used as a source for an IMG tag or a DIV background. This will present the gray icon of the stated extension. -
overwolf-extension://<extension uid>/<path to extension file>
Returns the content of a file in an app's library.
Methods Reference
- overwolf.extensions.launch()
- overwolf.extensions.setInfo()
- overwolf.extensions.getInfo()
- overwolf.extensions.registerInfo()
- overwolf.extensions.unregisterInfo()
- overwolf.extensions.getRunningState()
- overwolf.extensions.getManifest()
- overwolf.extensions.relaunch()
- overwolf.extensions.updateExtension()
- overwolf.extensions.checkForExtensionUpdate()
- overwolf.extensions.getServiceConsumers()
Events Reference
- overwolf.extensions.onAppLaunchTriggered
- overwolf.extensions.onExtensionUpdated
- overwolf.extensions.onUncaughtException
Types Reference
- overwolf.extensions.CheckForUpdateResult Object
- overwolf.extensions.ExtensionUpdateState Enum
- overwolf.extensions.GetInfoResult Object
- overwolf.extensions.GetRunningStateResult Object
- overwolf.extensions.ServiceProvidersDataResult Object
launch(uid, parameter)
Version added: 0.78
Launch an extension by unique ID.
Parameter | Type | Description |
---|---|---|
uid | string | Extension unique ID |
parameter | Object (optional) | A parameter passed to the extension. The extension may or may not use this parameter |
Retrieve a service object by ID, which will usually provide external APIs.
Parameter | Type | Description |
---|---|---|
id | string | Service ID |
callback | function | A function called with the service, if found, and a flag indicating success or failure |
setInfo(info)
Version added: 0.91
Sets a string for other extensions to read.
Parameter | Type | Description |
---|---|---|
info | Object | An object to post |
getInfo(id, callback)
Version added: 0.91
Returns an extension’s info string.
Parameter | Type | Description |
---|---|---|
id | string | ID of the extension to get info for |
callback | function | Called with the info |
callback | (Result: GetInfoResult) => void | Called with the info |
registerInfo(id, eventsCallback, callback)
Version added: 0.91
Requests info updates for an extension. Will also be called when the extension launches or closes.
Parameter | Type | Description |
---|---|---|
id | string | ID of the extension to get updates for |
eventsCallback | function | A callback to receive info updates |
callback | (Result) => void | Returns with the result |
unregisterInfo(id, callback)
Version added: 0.91
Stop requesting info for an extension.
Parameter | Type | Description |
---|---|---|
id | string | ID of the extension to stop getting updates for |
callback | (Result) => void | Returns with the result |
getManifest(id, callback)
Version added: 0.91
Returns the requested extension’s manifest object.
Parameter | Type | Description |
---|---|---|
id | string | ID of the extension to get the manifest for |
callback | (Result: GetManifestResult => void) | Result of the request |
getRunningState(id, callback)
Version added: 0.91
Gets the running state of an extension.
Parameter | Type | Description |
---|---|---|
id | string | ID of the extension to get updates for |
callback | Result: GetRunningStateResult => void) | |
Result of the request |
relaunch()
Version added: 0.112
Relaunch the current app.
updateExtension(callback)
Version added: 0.133
Attempts to download an update for the calling extension.
This function allows apps to check and perform an update without having to wait for Overwolf to do so automatically.
Please read our Recommended extension update flow.
Parameter | Type | Description |
---|---|---|
callback | (Result: UpdateExtensionResult => void | Result of the request |
failsafe
note
The update has a failsafe mechanism while the game is active, making sure automatic updates won't happen during play only if a user action is detected, like pressing a button, for example.
checkForExtensionUpdate(callback)
Version added: 0.135
Checks if an update is available for the calling extension.
The function always returns UpToDate when used on an unpacked extension.
This function allows the current app to check if there is an extension update, without having to wait for Overwolf to do so. Calling this function will not automatically update the extension, just checks if an update exists.
Please read our Recommended extension update flow.
Parameter | Type | Description |
---|---|---|
callback | (Result: CheckForUpdateResult) => void | Result of the request |
Note
When releasing from the dev console a new version to production/testing environment, the checkForExtensionUpdate API will be "aware" of the new version after 2 hours or after Overwolf client restart.
getServiceConsumers(callback)
Version added: 0.135
return service providers manifest data.
Parameter | Type | Description |
---|---|---|
callback | (Result: ServiceProvidersDataResult) => void | Result of the request |