Skip to main content

overwolf.social.reddit API

Provides access to the Reddit social provider.

tip

You can use overwolf.social.getDisabledServices() method to check if the service is available.

Methods Reference

Events Reference

Types Reference

performUserLogin()

Version added: 0.128

Opens the login dialog.

There is no callback for this method and the only way to know if the user signed in is via onLoginStateChanged event.

performLogout(callback)

Version added: 0.128

Performs a "strong" sign out of Reddit, so that even if the user performs a login via the Overwolf Settings / Accounts page, he will be considered signed out.

ParameterTypeDescription
callback(Result) => voidA callback function which will be called with the status of the request

getUserInfo(callback)

Version added: 0.128

If the user is currently logged into Reddit, this will return user information, Otherwise, an error is returned.

ParameterTypeDescription
callback(Result: GetUserInfoResult) => voidA callback function which will be called with the status of the request

searchSubreddits(query, callback)

Version added: 0.128

Search for subreddits whose names begin with a substring.

ParameterTypeDescription
querystringThe search string
callback(Result: SearchSubredditsResult) => voidWill contain an array of subreddits that match the search string

share(RedditShareParameters, callback)

Version added: 0.128

If the user is currently logged into reddit, this will perform the video share.

ParameterTypeDescription
redditShareParametersRedditShareParameters ObjectThe share parameters
callback(Result) => voidA callback function which will be called with the status of the request

Types of errors that can occur:

  • Disconnected (user isn't signed in)
  • MissingFile (trying to share a missing file)
  • UnsupportedFile (trying to share an unsupported format)

shareEx(RedditShareParameters, callback, callback)

Version added: 0.198

If the user is currently logged into Reddit, this will perform the video share.

ParameterTypeDescription
redditShareParamsRedditShareParameters ObjectThe share parameters
resultCallback(SocialShareResult) => voidA callback function which will be called with the resulting status of the request
progressCallback(socialShareProgress) => voidA callback function which will be called whenever share progress is made

Types of errors that can occur:

  • Disconnected (user isn't signed in)
  • MissingFile (trying to share a missing file)
  • UnsupportedFile (trying to share an unsupported format)

cancelShare(string, callback)

Version added: 0.198

cancels an ongoing share request with the given id, if valid. Callback will be invoked with success if such a request was found and a cancellation order was executed (may take a while)

ParameterTypeDescription
idstringThe request ID
callback(Result) => voidCalled with the result of the cancellation
overwolf.social.reddit.cancelShare("2", console.log)

post(RedditPostParameters, callback)

Version added: 0.203

If the user is currently logged into Reddit, this will perform the video share.

ParameterTypeDescription
redditShareParamsRedditPostParameters ObjectThe post parameters
callback(Result) => voidA callback function which will be called with the status of the request

Types of errors that can occur:

  • Disconnected (user isn't signed in)

getSubredditFlairs(subredditName, callback)

Version added: 0.160

Returns a list of flairs supported by the given subreddit.

ParameterTypeDescription
subredditNamestringThe given subreddit
callback(Result) => voidA callback function which will be called with the status of the request

onLoginStateChanged

Version added: 0.128

Fired when the user’s login state changes, with the following structure: LoginStateChangedEvent Object.

onShareFailed

Version added: 0.128

Fired when an error is returned from Reddit, with the following structure: ShareFailedEvent Object.

RedditPostParameters Object

Version added: 0.203

This object defines all parameters that should be passed to the Reddit post().

note

Putting a URL in the content property will create a Reddit post that is of a link type. Otherwise, it will be a normal "self" reddit post.

ParameterTypeDescription
subredditstringThe subreddit to which the post will be shared
titlestringThe shared post's title
contentstringThe shared post's content
flair_id (Optional)Flair object

RedditShareParameters Object

Version added: 0.128

This object defines all parameters that can/should be passed to the Reddit share() and shareEx() methods.

ParameterTypeDescription
filestringThe file to share
id (Optional)stringThe ID for the current share request. See note
useOverwolfNotificationsbooleanWhether or not overwolf notifications should be used. See note
subredditstringThe subreddit to which the file will be shared
titlestringThe shared video's title
descriptionstringThe shared video's description
trimming (Optional)VideoCompositionSegmentAn object containing start time and end time for the desired VideoCompositionSegment
tags (Optional)stringAn array of chronological events that occurred during the capture
gameClassId (Optional)intThe associated game's class ID
gameTitle (Optional)stringThe associated game's title
metadata (Optional)objectExtra information about the game session
flair_id (Optional)Flair object

id note

When calling overwolf.social.reddit.shareEx(), 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.reddit.cancelShare().

useOverwolfNotifications note

When calling overwolf.social.reddit.share(), this will default to true. When calling overwolf.social.reddit.shareEx(), this will default to false.

Data example

{
"file": "file://D:\\Videos\\Overwolf\\Outplayed\\League of Legends/League of Legends_8-16-2020_2-6-20-576\\League of Legends 08-16-2020_2-06-22-522.mp4",
"id": "5",
"useOverwolfNotifications": false,
"tags": [
"PvP Round"
],
"gameClassId": 5426,
"gameTitle": "League of Legends",
"title": "Check out my video! #TeamfightTactics | Captured by #Outplayed",
"subreddit": "clips",
"trimming": {
"startTime": 1136507,
"endTime": 1177391
},
"metadata": {
"mode": "tft"
}
}

SocialShareResult Object

Version added: 0.198

Container for the url shared in a successful share.

ParameterTypeDescription
urlstringThe url of the generated result

Example data

{
"url": "https://v.redd.it/z08avb339n801/DASH_1_2_M"
}

SocialShareProgress Object

Version added: 0.198

The current progress of the share request

ParameterTypeDescription
progressintThe current precentage of upload progress
idstringThe id of the share request
stateShareStateThe current state of the share request

Example data

{
"progress": 56,
"id": "1",
"state": "Uploading"
}

ShareState Enum

Version added: 0.198

The current state of the overwolf.social.reddit.shareEx() operation.

OptionsDescription
StartedThe upload has started
UploadingThe upload is in progress
FinishedThe upload has finished

SearchSubredditsResult Object

Version added: 0.128

Container for search subreddits result.

ParameterTypeDescription
subredditsSubreddit[]

Subreddit Object

Version added: 0.128

Container object.

ParameterTypeDescription
subredditnumber
namestring
displayNamestring
allowedPostTypesRedditAllowedPostTypes object
communityIconnumber

RedditAllowedPostTypes Object

Version added: 0.128

Container object.

ParameterTypeDescription
imagesboolean
textboolean
videosboolean
linksboolean
spoilersboolean

ShareFailedEvent Object

Version added: 0.128

Container object.

ParameterTypeDescription
errorstring
detailsstring

Event Data Example: Success

Currently, supported errors are:

{ "error": "NotFound", "details": "that subreddit doesn't exist" }
{ "error": "RateLimit", "details": "you are doing that too much. try again in 7 minutes." }

Flair Object

Version added: 0.160

Container object.

ParameterTypeDescription
idstring
textstring
mod_onlyboolean
allowable_contentstring

Data Example

{
"id": "248a072-1e48-11e6-0e1648f491d1",
"text": "Highlight",
"mod_only": false,
"allowable_content": "all"
}