overwolf.social API
Provides sharing services to different social networks like Reddit, Twitter, etc. and also information about the currently disabled services.
Methods Reference
Types Reference
- GetDisabledServicesResult Object
- GetUserInfoResult Object
- overwolf.social.VideoUploadParams Object
- overwolf.social.VideoUploadResult Object
- overwolf.social.VideoUploadProgress Object
- overwolf.social.LoginState enum
- overwolf.social.LoginStateChangedEvent Object
getDisabledServices(callback)
Version added: 0.126
Checks which of the supported sharing services are disabled or enabled.
Note: You can’t disable or enable sharing service from your app. It’s done from the Overwolf servers.
Parameter | Type | Description |
---|---|---|
callback | (Result: GetDisabledServicesResult) => void | returns a list of disabled services |
uploadVideo(VideoUploadParams, callback, callback)
Version added: 0.203
Upload a video to the buffer server.
Parameter | Type | Description |
---|---|---|
uploadParams | VideoUploadParams | Parameters for the video being uploaded |
resultCallback | (Result: VideoUploadResult) => void | A callback function which will be called with the resulting status of the request |
progressCallback | (Result: VideoUploadProgress) => void | A callback function which will be called whenever upload progress is made |
cancelUpload(string, callback)
Version added: 0.203
Cancels an upload to the buffer server mid-way.
Parameter | Type | Description |
---|---|---|
id | string | The request ID |
callback | (Result) => void | Called with the result of the cancellation |
VideoUploadParams Object
Version added: 0.203
This object defines all parameters that should be passed to the
overwolf.social.cancelUpload()
.
Parameter | Type | Description |
---|---|---|
id | string | The ID for the current upload. See note |
filePath | string | The path to the file to upload |
id note
When calling overwolf.social.uploadVideo()
, it is required to supply it with a request ID. This ID will also be used in case you wish to cancel this share using overwolf.social.cancelUpload()
.
VideoUploadResult Object
Version added: 0.203
Container for the url created in a successful upload.
Parameter | Type | Description |
---|---|---|
url | string | The url of the generated result |
VideoUploadProgress Object
Version added: 0.203
The current progress of the share request
Parameter | Type | Description |
---|---|---|
progress | int | The current precentage of upload progress |
id | string | The id of the share request |
state | ShareState | The current state of the share request |
Example data
{
"progress": 60,
"id": "7",
"state": "Uploading"
}
ShareState Enum
Version added: 0.203
The current state of the
overwolf.social.uploadVideo()
operation.
Options | Description |
---|---|
Started | The upload has started |
Uploading | The upload is in progress |
Finished | The upload has finished |
GetDisabledServicesResult Object
Version added: 0.126
Container for GetDisabledServices result.
Parameter | Type | Description |
---|---|---|
disabled_services | string[] |
Callback argument: Success
{"success":true,"disabled_services":["youtube"]}
GetUserInfoResult Object
Version added: 0.128
Container for get user info result.
Parameter | Type | Description |
---|---|---|
userInfo | object |
Example data: Reddit / Youtube / Twitter
{
"status": "success",
"userInfo": {
"avatar": "http://abs.twimg.com/sticky/...",
"id": "111111111112222222",
"name": "full name",
"screenName": "screenname123"
}
}
Example data: Discord user
{
"status": "success",
"userInfo": {
"id": "1111111111111",
"discriminator": 9999,
"username": "itay",
"email": "itay@overwolf.com",
"avatar": null,
"verified": true
}
}
LoginStateChangedEvent Object
Version added: 0.128
Container object.
Parameter | Type | Description |
---|---|---|
state | LoginState enum |
Event Data Example: Success
{ "state": "connected"/"disconnected" }
LoginState enum
Version added: 0.128
Options | Description |
---|---|
Connected | "connected" |
Disconnected | "disconnected" |