Reddit.NET  1.5
Reddit.NET is a .NET Standard library that provides easy access to the Reddit API with virtually no boilerplate code required.
Reddit.Controllers.LiveThread Class Reference

Controller class for live threads. More...

Inheritance diagram for Reddit.Controllers.LiveThread:
Reddit.Controllers.Internal.Monitors Reddit.Controllers.BaseController Reddit.Controllers.Internal.Validators

Public Member Functions

 LiveThread (Dispatch dispatch, LiveThread liveThread)
 Create a new live thread controller instance from another live thread controller instance. More...
 
 LiveThread (Dispatch dispatch, LiveUpdateEvent liveUpdateEvent)
 Create a new live thread controller instance from API return data. More...
 
 LiveThread (Dispatch dispatch, string title=null, string description=null, bool nsfw=false, string resources=null, string id=null, string name=null, string websocketUrl=null, string announcementUrl=null, string state=null, string icon=null, int? totalViews=null, int viewerCount=0, DateTime created=default(DateTime), bool isAnnouncement=false)
 Create a new live thread controller instance, populated manually. More...
 
 LiveThread (Dispatch dispatch, string id)
 Create a new live thread controller instance populated with only its id. More...
 
LiveThread About ()
 Get some basic information about the live thread. More...
 
List< LiveUpdateGetUpdates (string after="", string before="", string styleSr="", int count=0, int limit=25)
 Get a list of updates posted in this thread. More...
 
List< LiveUpdateGetUpdates (LiveThreadsGetUpdatesInput liveThreadsGetUpdatesInput)
 Get a list of updates posted in this thread. More...
 
LiveThread Create (string title=null, string description=null, bool? nsfw=null, string resources=null)
 Create a new live thread. More...
 
async Task< LiveThreadCreateAsync (string title=null, string description=null, bool? nsfw=null, string resources=null)
 Create a new live thread asynchronously. More...
 
LiveThread Create (LiveThreadsConfigInput liveThreadsConfigInput)
 Create a new live thread. More...
 
async Task< LiveThreadCreateAsync (LiveThreadsConfigInput liveThreadsConfigInput)
 Create a new live thread asynchronously. More...
 
void AcceptContributorInvite ()
 Accept a pending invitation to contribute to the thread. More...
 
async Task AcceptContributorInviteAsync ()
 Asynchronously accept a pending invitation to contribute to the thread. More...
 
void Close ()
 Permanently close the thread, disallowing future updates. Requires the close permission for this thread. Returns forbidden response if the thread has already been closed. More...
 
async Task CloseAsync ()
 Permanently close the thread asynchronously, disallowing future updates. Requires the close permission for this thread. Returns forbidden response if the thread has already been closed. More...
 
void DeleteUpdate (string updateId)
 Delete an update from the thread. Requires that specified update must have been authored by the user or that you have the edit permission for this thread. More...
 
async Task DeleteUpdateAsync (string updateId)
 Delete an update from the thread asynchronously. Requires that specified update must have been authored by the user or that you have the edit permission for this thread. More...
 
void SaveChanges ()
 Configure the thread. Requires the settings permission for this thread. More...
 
async Task SaveChangesAsync ()
 Configure the thread asynchronously. Requires the settings permission for this thread. More...
 
void Edit (string title, string description, bool nsfw, string resources)
 Configure the thread. Requires the settings permission for this thread. More...
 
async Task EditAsync (string title, string description, bool nsfw, string resources)
 Configure the thread asynchronously. Requires the settings permission for this thread. More...
 
void Edit (LiveThreadsConfigInput liveThreadsConfigInput)
 Configure the thread. Requires the settings permission for this thread. More...
 
async Task EditAsync (LiveThreadsConfigInput liveThreadsConfigInput)
 Configure the thread asynchronously. Requires the settings permission for this thread. More...
 
void InviteContributor (string name, string permissions, string type)
 Invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More...
 
async Task InviteContributorAsync (string name, string permissions, string type)
 Asynchronously invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More...
 
void InviteContributor (LiveThreadsContributorInput liveThreadsContributorInput)
 Invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More...
 
async Task InviteContributorAsync (LiveThreadsContributorInput liveThreadsContributorInput)
 Asynchronously invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified. More...
 
void Abandon ()
 Abdicate contributorship of the thread. More...
 
async Task AbandonAsync ()
 Abdicate contributorship of the thread asynchronously. More...
 
void Report (string type)
 Report the thread for violating the rules of reddit. More...
 
async Task ReportAsync (string type)
 Asynchronously report the thread for violating the rules of reddit. More...
 
void RemoveContributor (string user)
 Revoke another user's contributorship. Requires the manage permission for this thread. More...
 
async Task RemoveContributorAsync (string user)
 Revoke another user's contributorship asynchronously. Requires the manage permission for this thread. More...
 
void RemoveContributorInvite (string user)
 Revoke an outstanding contributor invite. Requires the manage permission for this thread. More...
 
async Task RemoveContributorInviteAsync (string user)
 Revoke an outstanding contributor invite asynchronously. Requires the manage permission for this thread. More...
 
void SetContributorPermissions (string name, string permissions, string type)
 Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More...
 
async Task SetContributorPermissionsAsync (string name, string permissions, string type)
 Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More...
 
void SetContributorPermissions (LiveThreadsContributorInput liveThreadsContributorInput)
 Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More...
 
async Task SetContributorPermissionsAsync (LiveThreadsContributorInput liveThreadsContributorInput)
 Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely. More...
 
void StrikeUpdate (string updateId)
 Strike (mark incorrect and cross out) the content of an update. Requires that specified update must have been authored by the user or that you have the edit permission for this thread. More...
 
async Task StrikeUpdateAsync (string updateId)
 Strike (mark incorrect and cross out) the content of an update asynchronously. Requires that specified update must have been authored by the user or that you have the edit permission for this thread. More...
 
void Update (string body)
 Post an update to the thread. Requires the update permission for this thread. More...
 
async Task UpdateAsync (string body)
 Post an update to the thread asynchronously. Requires the update permission for this thread. More...
 
List< UserListContainerGetContributors ()
 Get a list of users that contribute to this thread. Note that this includes users who were invited but have not yet accepted. More...
 
LiveUpdate GetUpdate (string updateId)
 Get details about a specific update in a live thread. More...
 
bool MonitorThread (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null, bool useCache=true)
 Monitor this live thread for any configuration changes. More...
 
bool MonitorContributors (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null, bool useCache=true)
 Monitor this live thread for any new or removed contributors. More...
 
bool MonitorUpdates (int? monitoringDelayMs=null, int? monitoringBaseDelayMs=null, List< MonitoringSchedule > schedule=null, bool? breakOnFailure=null, DateTime? monitoringExpiration=null, bool useCache=true)
 Monitor this live thread for any new updates. More...
 
bool LiveThreadIsMonitored ()
 
bool LiveThreadContributorsIsMonitored ()
 
bool LiveThreadUpdatesIsMonitored ()
 
- Public Member Functions inherited from Reddit.Controllers.Internal.Monitors
 Monitors ()
 
void Wait (int ms)
 
bool IsMonitored (string key, string subKey)
 
bool IsScheduled ()
 
void WaitOrDie (string key, int timeout=60)
 
void WaitOrDie (Thread thread, int timeout=60)
 
void KillAllMonitoringThreads ()
 
- Public Member Functions inherited from Reddit.Controllers.BaseController
 BaseController ()
 Create a new Controller instance. More...
 
- Public Member Functions inherited from Reddit.Controllers.Internal.Validators
Exception BuildException (Exception ex, List< List< string >> errors)
 
dynamic Validate (dynamic obj)
 
GenericContainer Validate (GenericContainer genericContainer)
 
Generic Validate (Generic generic)
 
DynamicShortListingContainer Validate (DynamicShortListingContainer dynamicShortListingContainer)
 
DynamicShortListingData Validate (DynamicShortListingData dynamicShortListingData)
 
ImageUploadResult Validate (ImageUploadResult imageUploadResult)
 
LiveUpdateEventContainer Validate (LiveUpdateEventContainer liveUpdateEventContainer)
 
LiveThreadCreateResultContainer Validate (LiveThreadCreateResultContainer liveThreadCreateResultContainer)
 
LiveUpdateContainer Validate (LiveUpdateContainer liveUpdateContainer, int? minChildren=null)
 
SubredditSettingsContainer Validate (SubredditSettingsContainer subredditSettingsContainer)
 
SubredditSettings Validate (SubredditSettings subredditSettings)
 
List< ActionResultValidate (List< ActionResult > actionResults)
 
ActionResult Validate (ActionResult actionResult)
 
FlairListResultContainer Validate (FlairListResultContainer flairListResultContainer)
 
Flair Validate (Flair flair)
 
FlairV2 Validate (FlairV2 flairV2)
 
ModActionContainer Validate (ModActionContainer modActionContainer)
 
ModActionData Validate (ModActionData modActionData)
 
WikiPageRevisionContainer Validate (WikiPageRevisionContainer wikiPageRevisionContainer)
 
WikiPageRevisionData Validate (WikiPageRevisionData wikiPageRevisionData)
 
WikiPageSettingsContainer Validate (WikiPageSettingsContainer wikiPageSettingsContainer)
 
WikiPageSettings Validate (WikiPageSettings wikiPageSettings)
 
List< UserPrefsContainerValidate (List< UserPrefsContainer > userPrefsContainers)
 
UserPrefsContainer Validate (UserPrefsContainer userPrefsContainer)
 
UserPrefsData Validate (UserPrefsData userPrefsData)
 
PostResultShortContainer Validate (PostResultShortContainer postResultShortContainer)
 
PostResultShort Validate (PostResultShort postResultShort)
 
PostResultContainer Validate (PostResultContainer postResultContainer)
 
PostResult Validate (PostResult postResult)
 
JQueryReturn Validate (JQueryReturn jQueryReturn)
 
List<(PostContainer, CommentContainer)> Validate (List<(PostContainer, CommentContainer)> ps)
 
CommentResultContainer Validate (CommentResultContainer commentResultContainer)
 
SubredditContainer Validate (SubredditContainer subredditContainer)
 

Protected Member Functions

virtual void OnThreadUpdated (LiveThreadUpdateEventArgs e)
 
virtual void OnContributorsUpdated (LiveThreadContributorsUpdateEventArgs e)
 
virtual void OnUpdatesUpdated (LiveThreadUpdatesUpdateEventArgs e)
 
override Thread CreateMonitoringThread (string key, string subKey, int startDelayMs=0, int? monitoringDelayMs=null)
 
- Protected Member Functions inherited from Reddit.Controllers.Internal.Monitors
bool Monitor (string key, Thread thread, string subKey)
 
void RebuildThreads (string subKey)
 
void LaunchThreadIfNotNull (string key, Thread thread)
 
void KillThread (Thread thread)
 
void KillThread (string key)
 
void ResetThreads (List< string > oldThreads)
 
- Protected Member Functions inherited from Reddit.Controllers.Internal.Validators
void CheckErrors (List< List< string >> errors)
 
void CheckErrors (List< string > errors)
 
void CheckNull (object res, string msg="Reddit API returned null response.")
 

Properties

string? Id [get, set]
 The ID36 of the live thread. More...
 
string? Fullname [get, set]
 The fullname of the live thread. More...
 
string? Description [get, set]
 A description of the live thread. More...
 
bool? NSFW [get, set]
 Whether the live thread is NSFW. More...
 
string? Resources [get, set]
 Live thread resources. More...
 
string? Title [get, set]
 Title of the live thread. More...
 
int?? TotalViews [get, set]
 How many views the live thread has. More...
 
DateTime?? Created [get, set]
 When the live thread was created. More...
 
string? WebsocketURL [get, set]
 Web socket URL (web sockets not yet supported by this library) More...
 
bool? IsAnnouncement [get, set]
 Whether the live thread is an announcement. More...
 
string? AnnouncementURL [get, set]
 The announcement URL. More...
 
string? State [get, set]
 Live thread state. More...
 
int? ViewerCount [get, set]
 How many people are viewing the live thread right now. More...
 
string? Icon [get, set]
 Icon URL for the live thread. More...
 
LiveUpdateEvent EventData [get, set]
 The full LiveUpdateEvent data retrieved from the API. More...
 
List< LiveUpdate >? Updates [get]
 List of live thread updates. More...
 
List< UserListContainer >? Contributors [get]
 List of live thread contributors. More...
 
- Properties inherited from Reddit.Controllers.Internal.Monitors
IDictionary< string, HashSet< string > > MonitoringCache [get, set]
 An optional cache for preventing the same post from appearing multiple times during monitoring. See: https://github.com/sirkris/Reddit.NET/issues/117#issuecomment-759501039 More...
 
- Properties inherited from Reddit.Controllers.BaseController
Lists Lists [get, set]
 List-handling. More...
 

Events

EventHandler< LiveThreadUpdateEventArgsThreadUpdated
 Event handler for monitoring changes to live thread for changes to its properties. More...
 
EventHandler< LiveThreadContributorsUpdateEventArgsContributorsUpdated
 Event handler for monitoring changes to the contributors list. More...
 
EventHandler< LiveThreadUpdatesUpdateEventArgsUpdatesUpdated
 Event handler for monitoring live updates. More...
 

Additional Inherited Members

- Public Attributes inherited from Reddit.Controllers.Internal.Monitors
int MonitoringWaitDelayMS = 1500
 
- Protected Attributes inherited from Reddit.Controllers.Internal.Monitors
volatile bool Terminate = false
 

Detailed Description

Controller class for live threads.

Constructor & Destructor Documentation

◆ LiveThread() [1/4]

Reddit.Controllers.LiveThread.LiveThread ( Dispatch  dispatch,
LiveThread  liveThread 
)

Create a new live thread controller instance from another live thread controller instance.

Parameters
dispatch
liveThreadA valid instance of this class

◆ LiveThread() [2/4]

Reddit.Controllers.LiveThread.LiveThread ( Dispatch  dispatch,
LiveUpdateEvent  liveUpdateEvent 
)

Create a new live thread controller instance from API return data.

Parameters
dispatch
liveUpdateEvent

◆ LiveThread() [3/4]

Reddit.Controllers.LiveThread.LiveThread ( Dispatch  dispatch,
string  title = null,
string  description = null,
bool  nsfw = false,
string  resources = null,
string  id = null,
string  name = null,
string  websocketUrl = null,
string  announcementUrl = null,
string  state = null,
string  icon = null,
int?  totalViews = null,
int  viewerCount = 0,
DateTime  created = default(DateTime),
bool  isAnnouncement = false 
)

Create a new live thread controller instance, populated manually.

Parameters
dispatch
titleTitle of the thread
descriptionDescription of the thread
nsfwWhether the thread is NSFW
resources
id
name
websocketUrl
announcementUrl
state
icon
totalViews
viewerCount
created
isAnnouncement

◆ LiveThread() [4/4]

Reddit.Controllers.LiveThread.LiveThread ( Dispatch  dispatch,
string  id 
)

Create a new live thread controller instance populated with only its id.

Parameters
dispatch
idA valid live thread ID

Member Function Documentation

◆ Abandon()

void Reddit.Controllers.LiveThread.Abandon ( )

Abdicate contributorship of the thread.

◆ AbandonAsync()

async Task Reddit.Controllers.LiveThread.AbandonAsync ( )

Abdicate contributorship of the thread asynchronously.

◆ About()

LiveThread Reddit.Controllers.LiveThread.About ( )

Get some basic information about the live thread.

Returns
An instance of this class populated with the returned data.

◆ AcceptContributorInvite()

void Reddit.Controllers.LiveThread.AcceptContributorInvite ( )

Accept a pending invitation to contribute to the thread.

◆ AcceptContributorInviteAsync()

async Task Reddit.Controllers.LiveThread.AcceptContributorInviteAsync ( )

Asynchronously accept a pending invitation to contribute to the thread.

◆ Close()

void Reddit.Controllers.LiveThread.Close ( )

Permanently close the thread, disallowing future updates. Requires the close permission for this thread. Returns forbidden response if the thread has already been closed.

◆ CloseAsync()

async Task Reddit.Controllers.LiveThread.CloseAsync ( )

Permanently close the thread asynchronously, disallowing future updates. Requires the close permission for this thread. Returns forbidden response if the thread has already been closed.

◆ Create() [1/2]

LiveThread Reddit.Controllers.LiveThread.Create ( LiveThreadsConfigInput  liveThreadsConfigInput)

Create a new live thread.

Parameters
liveThreadsConfigInputA valid LiveThreadsConfigInput instance
Returns
An instance of this class populated with data from the new live thread.

◆ Create() [2/2]

LiveThread Reddit.Controllers.LiveThread.Create ( string  title = null,
string  description = null,
bool?  nsfw = null,
string  resources = null 
)

Create a new live thread.

Parameters
titlea string no longer than 120 characters
descriptionraw markdown text
nsfwboolean value
resourcesraw markdown text
Returns
An instance of this class populated with data from the new live thread.

◆ CreateAsync() [1/2]

async Task<LiveThread> Reddit.Controllers.LiveThread.CreateAsync ( LiveThreadsConfigInput  liveThreadsConfigInput)

Create a new live thread asynchronously.

Parameters
liveThreadsConfigInputA valid LiveThreadsConfigInput instance

◆ CreateAsync() [2/2]

async Task<LiveThread> Reddit.Controllers.LiveThread.CreateAsync ( string  title = null,
string  description = null,
bool?  nsfw = null,
string  resources = null 
)

Create a new live thread asynchronously.

Parameters
titlea string no longer than 120 characters
descriptionraw markdown text
nsfwboolean value
resourcesraw markdown text

◆ CreateMonitoringThread()

override Thread Reddit.Controllers.LiveThread.CreateMonitoringThread ( string  key,
string  subKey,
int  startDelayMs = 0,
int?  monitoringDelayMs = null 
)
protectedvirtual

◆ DeleteUpdate()

void Reddit.Controllers.LiveThread.DeleteUpdate ( string  updateId)

Delete an update from the thread. Requires that specified update must have been authored by the user or that you have the edit permission for this thread.

Parameters
updateNamethe Name of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

◆ DeleteUpdateAsync()

async Task Reddit.Controllers.LiveThread.DeleteUpdateAsync ( string  updateId)

Delete an update from the thread asynchronously. Requires that specified update must have been authored by the user or that you have the edit permission for this thread.

Parameters
updateNamethe Name of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

◆ Edit() [1/2]

void Reddit.Controllers.LiveThread.Edit ( LiveThreadsConfigInput  liveThreadsConfigInput)

Configure the thread. Requires the settings permission for this thread.

Parameters
liveThreadsConfigInputA valid LiveThreadsConfigInput instance

◆ Edit() [2/2]

void Reddit.Controllers.LiveThread.Edit ( string  title,
string  description,
bool  nsfw,
string  resources 
)

Configure the thread. Requires the settings permission for this thread.

Parameters
titlea string no longer than 120 characters
descriptionraw markdown text
nsfwboolean value
resourcesraw markdown text

◆ EditAsync() [1/2]

async Task Reddit.Controllers.LiveThread.EditAsync ( LiveThreadsConfigInput  liveThreadsConfigInput)

Configure the thread asynchronously. Requires the settings permission for this thread.

Parameters
liveThreadsConfigInputA valid LiveThreadsConfigInput instance

◆ EditAsync() [2/2]

async Task Reddit.Controllers.LiveThread.EditAsync ( string  title,
string  description,
bool  nsfw,
string  resources 
)

Configure the thread asynchronously. Requires the settings permission for this thread.

Parameters
titlea string no longer than 120 characters
descriptionraw markdown text
nsfwboolean value
resourcesraw markdown text

◆ GetContributors()

List<UserListContainer> Reddit.Controllers.LiveThread.GetContributors ( )

Get a list of users that contribute to this thread. Note that this includes users who were invited but have not yet accepted.

Returns
A list of users (0 => Active contributors, 1 => Invited/pending contributors).

◆ GetUpdate()

LiveUpdate Reddit.Controllers.LiveThread.GetUpdate ( string  updateId)

Get details about a specific update in a live thread.

Parameters
updateIdUpdate Id (not the Name; i.e. without the "LiveUpdate_" prefix)
Returns
The requested update.

◆ GetUpdates() [1/2]

List<LiveUpdate> Reddit.Controllers.LiveThread.GetUpdates ( LiveThreadsGetUpdatesInput  liveThreadsGetUpdatesInput)

Get a list of updates posted in this thread.

Parameters
liveThreadsGetUpdatesInputA valid LiveThreadsGetUpdatesInput instance
Returns
The requested live updates.

◆ GetUpdates() [2/2]

List<LiveUpdate> Reddit.Controllers.LiveThread.GetUpdates ( string  after = "",
string  before = "",
string  styleSr = "",
int  count = 0,
int  limit = 25 
)

Get a list of updates posted in this thread.

Parameters
afterfullname of a thing
beforefullname of a thing
styleSrsubreddit name
counta positive integer (default: 0)
limitthe maximum number of items desired (default: 25, maximum: 100)
Returns
The requested live updates.

◆ InviteContributor() [1/2]

void Reddit.Controllers.LiveThread.InviteContributor ( LiveThreadsContributorInput  liveThreadsContributorInput)

Invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.

Parameters
liveThreadsContributorInputA valid LiveThreadsContributorInput instance

◆ InviteContributor() [2/2]

void Reddit.Controllers.LiveThread.InviteContributor ( string  name,
string  permissions,
string  type 
)

Invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.

Parameters
namethe name of an existing user
permissionspermission description e.g. +update,+edit,-manage
typeone of (liveupdate_contributor_invite, liveupdate_contributor)

◆ InviteContributorAsync() [1/2]

async Task Reddit.Controllers.LiveThread.InviteContributorAsync ( LiveThreadsContributorInput  liveThreadsContributorInput)

Asynchronously invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.

Parameters
liveThreadsContributorInputA valid LiveThreadsContributorInput instance

◆ InviteContributorAsync() [2/2]

async Task Reddit.Controllers.LiveThread.InviteContributorAsync ( string  name,
string  permissions,
string  type 
)

Asynchronously invite another user to contribute to the thread. Requires the manage permission for this thread. If the recipient accepts the invite, they will be granted the permissions specified.

Parameters
namethe name of an existing user
permissionspermission description e.g. +update,+edit,-manage
typeone of (liveupdate_contributor_invite, liveupdate_contributor)

◆ LiveThreadContributorsIsMonitored()

bool Reddit.Controllers.LiveThread.LiveThreadContributorsIsMonitored ( )

◆ LiveThreadIsMonitored()

bool Reddit.Controllers.LiveThread.LiveThreadIsMonitored ( )

◆ LiveThreadUpdatesIsMonitored()

bool Reddit.Controllers.LiveThread.LiveThreadUpdatesIsMonitored ( )

◆ MonitorContributors()

bool Reddit.Controllers.LiveThread.MonitorContributors ( int?  monitoringDelayMs = null,
int?  monitoringBaseDelayMs = null,
List< MonitoringSchedule schedule = null,
bool?  breakOnFailure = null,
DateTime?  monitoringExpiration = null,
bool  useCache = true 
)

Monitor this live thread for any new or removed contributors.

Parameters
monitoringDelayMsThe number of milliseconds between each monitoring query; leave null to auto-manage
monitoringBaseDelayMsThe number of milliseconds between each monitoring query PER THREAD (default: 1500)
scheduleA list of one or more timeframes during which monitoring of this object will occur (default: 24/7)
breakOnFailureIf true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false)
monitoringExpirationIf set, monitoring will automatically stop after the specified DateTime is reached
useCacheWhether to cache the IDs of the monitoring results to prevent duplicate fires (default: true)
Returns
Whether monitoring was successfully initiated.

◆ MonitorThread()

bool Reddit.Controllers.LiveThread.MonitorThread ( int?  monitoringDelayMs = null,
int?  monitoringBaseDelayMs = null,
List< MonitoringSchedule schedule = null,
bool?  breakOnFailure = null,
DateTime?  monitoringExpiration = null,
bool  useCache = true 
)

Monitor this live thread for any configuration changes.

Parameters
monitoringDelayMsThe number of milliseconds between each monitoring query; leave null to auto-manage
monitoringBaseDelayMsThe number of milliseconds between each monitoring query PER THREAD (default: 1500)
scheduleA list of one or more timeframes during which monitoring of this object will occur (default: 24/7)
breakOnFailureIf true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false)
monitoringExpirationIf set, monitoring will automatically stop after the specified DateTime is reached
useCacheWhether to cache the IDs of the monitoring results to prevent duplicate fires (default: true)
Returns
Whether monitoring was successfully initiated.

◆ MonitorUpdates()

bool Reddit.Controllers.LiveThread.MonitorUpdates ( int?  monitoringDelayMs = null,
int?  monitoringBaseDelayMs = null,
List< MonitoringSchedule schedule = null,
bool?  breakOnFailure = null,
DateTime?  monitoringExpiration = null,
bool  useCache = true 
)

Monitor this live thread for any new updates.

Parameters
monitoringDelayMsThe number of milliseconds between each monitoring query; leave null to auto-manage
monitoringBaseDelayMsThe number of milliseconds between each monitoring query PER THREAD (default: 1500)
scheduleA list of one or more timeframes during which monitoring of this object will occur (default: 24/7)
breakOnFailureIf true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false)
monitoringExpirationIf set, monitoring will automatically stop after the specified DateTime is reached
useCacheWhether to cache the IDs of the monitoring results to prevent duplicate fires (default: true)
Returns
Whether monitoring was successfully initiated.

◆ OnContributorsUpdated()

virtual void Reddit.Controllers.LiveThread.OnContributorsUpdated ( LiveThreadContributorsUpdateEventArgs  e)
protectedvirtual

◆ OnThreadUpdated()

virtual void Reddit.Controllers.LiveThread.OnThreadUpdated ( LiveThreadUpdateEventArgs  e)
protectedvirtual

◆ OnUpdatesUpdated()

virtual void Reddit.Controllers.LiveThread.OnUpdatesUpdated ( LiveThreadUpdatesUpdateEventArgs  e)
protectedvirtual

◆ RemoveContributor()

void Reddit.Controllers.LiveThread.RemoveContributor ( string  user)

Revoke another user's contributorship. Requires the manage permission for this thread.

Parameters
userfullname of an account

◆ RemoveContributorAsync()

async Task Reddit.Controllers.LiveThread.RemoveContributorAsync ( string  user)

Revoke another user's contributorship asynchronously. Requires the manage permission for this thread.

Parameters
userfullname of an account

◆ RemoveContributorInvite()

void Reddit.Controllers.LiveThread.RemoveContributorInvite ( string  user)

Revoke an outstanding contributor invite. Requires the manage permission for this thread.

Parameters
userfullname of an account

◆ RemoveContributorInviteAsync()

async Task Reddit.Controllers.LiveThread.RemoveContributorInviteAsync ( string  user)

Revoke an outstanding contributor invite asynchronously. Requires the manage permission for this thread.

Parameters
userfullname of an account

◆ Report()

void Reddit.Controllers.LiveThread.Report ( string  type)

Report the thread for violating the rules of reddit.

Parameters
typeone of (spam, vote-manipulation, personal-information, sexualizing-minors, site-breaking)

◆ ReportAsync()

async Task Reddit.Controllers.LiveThread.ReportAsync ( string  type)

Asynchronously report the thread for violating the rules of reddit.

Parameters
typeone of (spam, vote-manipulation, personal-information, sexualizing-minors, site-breaking)

◆ SaveChanges()

void Reddit.Controllers.LiveThread.SaveChanges ( )

Configure the thread. Requires the settings permission for this thread.

◆ SaveChangesAsync()

async Task Reddit.Controllers.LiveThread.SaveChangesAsync ( )

Configure the thread asynchronously. Requires the settings permission for this thread.

◆ SetContributorPermissions() [1/2]

void Reddit.Controllers.LiveThread.SetContributorPermissions ( LiveThreadsContributorInput  liveThreadsContributorInput)

Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.

Parameters
liveThreadsContributorInputA valid LiveThreadsContributorInput instance

◆ SetContributorPermissions() [2/2]

void Reddit.Controllers.LiveThread.SetContributorPermissions ( string  name,
string  permissions,
string  type 
)

Change a contributor or contributor invite's permissions. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.

Parameters
namethe name of an existing user
permissionspermission description e.g. +update,+edit,-manage
typeone of (liveupdate_contributor_invite, liveupdate_contributor)

◆ SetContributorPermissionsAsync() [1/2]

async Task Reddit.Controllers.LiveThread.SetContributorPermissionsAsync ( LiveThreadsContributorInput  liveThreadsContributorInput)

Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.

Parameters
liveThreadsContributorInputA valid LiveThreadsContributorInput instance

◆ SetContributorPermissionsAsync() [2/2]

async Task Reddit.Controllers.LiveThread.SetContributorPermissionsAsync ( string  name,
string  permissions,
string  type 
)

Change a contributor or contributor invite's permissions asynchronously. Requires the manage permission for this thread. Note that permissions overrides the previous value completely.

Parameters
namethe name of an existing user
permissionspermission description e.g. +update,+edit,-manage
typeone of (liveupdate_contributor_invite, liveupdate_contributor)

◆ StrikeUpdate()

void Reddit.Controllers.LiveThread.StrikeUpdate ( string  updateId)

Strike (mark incorrect and cross out) the content of an update. Requires that specified update must have been authored by the user or that you have the edit permission for this thread.

Parameters
updateIdthe ID (Name) of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

◆ StrikeUpdateAsync()

async Task Reddit.Controllers.LiveThread.StrikeUpdateAsync ( string  updateId)

Strike (mark incorrect and cross out) the content of an update asynchronously. Requires that specified update must have been authored by the user or that you have the edit permission for this thread.

Parameters
updateIdthe ID (Name) of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603

◆ Update()

void Reddit.Controllers.LiveThread.Update ( string  body)

Post an update to the thread. Requires the update permission for this thread.

Parameters
bodyraw markdown text

◆ UpdateAsync()

async Task Reddit.Controllers.LiveThread.UpdateAsync ( string  body)

Post an update to the thread asynchronously. Requires the update permission for this thread.

Parameters
bodyraw markdown text

Property Documentation

◆ AnnouncementURL

string? Reddit.Controllers.LiveThread.AnnouncementURL
getset

The announcement URL.

◆ Contributors

List<UserListContainer>? Reddit.Controllers.LiveThread.Contributors
get

List of live thread contributors.

◆ Created

DateTime?? Reddit.Controllers.LiveThread.Created
getset

When the live thread was created.

◆ Description

string? Reddit.Controllers.LiveThread.Description
getset

A description of the live thread.

◆ EventData

LiveUpdateEvent Reddit.Controllers.LiveThread.EventData
getset

The full LiveUpdateEvent data retrieved from the API.

◆ Fullname

string? Reddit.Controllers.LiveThread.Fullname
getset

The fullname of the live thread.

◆ Icon

string? Reddit.Controllers.LiveThread.Icon
getset

Icon URL for the live thread.

◆ Id

string? Reddit.Controllers.LiveThread.Id
getset

The ID36 of the live thread.

◆ IsAnnouncement

bool? Reddit.Controllers.LiveThread.IsAnnouncement
getset

Whether the live thread is an announcement.

◆ NSFW

bool? Reddit.Controllers.LiveThread.NSFW
getset

Whether the live thread is NSFW.

◆ Resources

string? Reddit.Controllers.LiveThread.Resources
getset

Live thread resources.

◆ State

string? Reddit.Controllers.LiveThread.State
getset

Live thread state.

◆ Title

string? Reddit.Controllers.LiveThread.Title
getset

Title of the live thread.

◆ TotalViews

int?? Reddit.Controllers.LiveThread.TotalViews
getset

How many views the live thread has.

◆ Updates

List<LiveUpdate>? Reddit.Controllers.LiveThread.Updates
get

List of live thread updates.

◆ ViewerCount

int? Reddit.Controllers.LiveThread.ViewerCount
getset

How many people are viewing the live thread right now.

◆ WebsocketURL

string? Reddit.Controllers.LiveThread.WebsocketURL
getset

Web socket URL (web sockets not yet supported by this library)

Event Documentation

◆ ContributorsUpdated

EventHandler<LiveThreadContributorsUpdateEventArgs> Reddit.Controllers.LiveThread.ContributorsUpdated

Event handler for monitoring changes to the contributors list.

◆ ThreadUpdated

EventHandler<LiveThreadUpdateEventArgs> Reddit.Controllers.LiveThread.ThreadUpdated

Event handler for monitoring changes to live thread for changes to its properties.

◆ UpdatesUpdated

EventHandler<LiveThreadUpdatesUpdateEventArgs> Reddit.Controllers.LiveThread.UpdatesUpdated

Event handler for monitoring live updates.


The documentation for this class was generated from the following file: