Skip to main content

overwolf.extensions.sharedData API

A set of APIs to allow independent extensions to communicate with each other.

Methods Reference

Events Reference

Types Reference

set(string appId, object value, callback)

Version added: 0.137

Used by the owner app to set data for the consumer app, by appId.

This function is one part of the service providing app to communicate with the consumer apps. for instance, Game Summary hosts GPO app in a tab. Game Summary is the owner, GPO is the cosumer.

ParameterTypeDescription
appIdstringThe requested app id
valueobject
callback(Result: GetResult) => voida status indicating success or failure

get(SharedDataParams param, callback)

Version added: 0.137

Used by the consumer app to get data set by the owner app.

This function is one part of the service providing app to communicate with the consumer apps. for instance, Game Summary hosts GPO app in a tab. Game Summary is the owner, GPO is the cosumer.

ParameterTypeDescription
paramSharedDataParams object
callback(Result: GetResult) => voida status indicating success or failure

Usage examples

overwolf.extensions.sharedData.get(
{origin:"nafihghfcpikebhfhdhljejkcifgbdahdhngepfb"},
data => {
// Process game enable state
// See result callback format below
}
);

overwolf.extensions.shareddata.get({},console.log) //retrun all data set to my self


overwolf.extensions.shareddata.get({origin:"*"},console.log) //return all data was set to my self


overwolf.extensions.shareddata.get({target:"fiekjlgoffmlmgfmggnoeoljkmfkcapcdmcgcfgm"},console.info) //retrun data i set to "fiekjlgoffmlmgfmggnoeoljkmfkcapcdmcgcfgm" (extension id)

onChanged

Version added: 0.137

Fired when the hosting app state changes, with the following structure: onChangedEvent Object

SharedDataParams Object

Version added: 0.137

Container that represent a shared data parameters.

ParameterTypeDescription
originstring
targetstring

GetResult Object

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
data<Dictionary> stringDictionary<T>: An object that maps strings to values of type "T"

onChangedEvent Object

ParameterTypeDescription
originstring
targetstring
datastring

Event Data Example: Success

{
"origin": string (uid),
"target": string (uid),
"data": string
}