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.