![]() |
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.
|
Controller class for live threads. More...
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< LiveUpdate > | GetUpdates (string after="", string before="", string styleSr="", int count=0, int limit=25) |
Get a list of updates posted in this thread. More... | |
List< LiveUpdate > | GetUpdates (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< LiveThread > | CreateAsync (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< LiveThread > | CreateAsync (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< UserListContainer > | GetContributors () |
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 () |
![]() | |
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 () |
![]() | |
BaseController () | |
Create a new Controller instance. More... | |
![]() | |
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< ActionResult > | Validate (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< UserPrefsContainer > | Validate (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) |
![]() | |
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) |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
Lists | Lists [get, set] |
List-handling. More... | |
Events | |
EventHandler< LiveThreadUpdateEventArgs > | ThreadUpdated |
Event handler for monitoring changes to live thread for changes to its properties. More... | |
EventHandler< LiveThreadContributorsUpdateEventArgs > | ContributorsUpdated |
Event handler for monitoring changes to the contributors list. More... | |
EventHandler< LiveThreadUpdatesUpdateEventArgs > | UpdatesUpdated |
Event handler for monitoring live updates. More... | |
Additional Inherited Members | |
![]() | |
int | MonitoringWaitDelayMS = 1500 |
![]() | |
volatile bool | Terminate = false |
Controller class for live threads.
Reddit.Controllers.LiveThread.LiveThread | ( | Dispatch | dispatch, |
LiveThread | liveThread | ||
) |
Create a new live thread controller instance from another live thread controller instance.
dispatch | |
liveThread | A valid instance of this class |
Reddit.Controllers.LiveThread.LiveThread | ( | Dispatch | dispatch, |
LiveUpdateEvent | liveUpdateEvent | ||
) |
Create a new live thread controller instance from API return data.
dispatch | |
liveUpdateEvent |
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.
dispatch | |
title | Title of the thread |
description | Description of the thread |
nsfw | Whether the thread is NSFW |
resources | |
id | |
name | |
websocketUrl | |
announcementUrl | |
state | |
icon | |
totalViews | |
viewerCount | |
created | |
isAnnouncement |
Reddit.Controllers.LiveThread.LiveThread | ( | Dispatch | dispatch, |
string | id | ||
) |
Create a new live thread controller instance populated with only its id.
dispatch | |
id | A valid live thread ID |
void Reddit.Controllers.LiveThread.Abandon | ( | ) |
Abdicate contributorship of the thread.
async Task Reddit.Controllers.LiveThread.AbandonAsync | ( | ) |
Abdicate contributorship of the thread asynchronously.
LiveThread Reddit.Controllers.LiveThread.About | ( | ) |
Get some basic information about the live thread.
void Reddit.Controllers.LiveThread.AcceptContributorInvite | ( | ) |
Accept a pending invitation to contribute to the thread.
async Task Reddit.Controllers.LiveThread.AcceptContributorInviteAsync | ( | ) |
Asynchronously accept a pending invitation to contribute to the thread.
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.
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.
LiveThread Reddit.Controllers.LiveThread.Create | ( | LiveThreadsConfigInput | liveThreadsConfigInput | ) |
Create a new live thread.
liveThreadsConfigInput | A valid LiveThreadsConfigInput instance |
LiveThread Reddit.Controllers.LiveThread.Create | ( | string | title = null , |
string | description = null , |
||
bool? | nsfw = null , |
||
string | resources = null |
||
) |
Create a new live thread.
title | a string no longer than 120 characters |
description | raw markdown text |
nsfw | boolean value |
resources | raw markdown text |
async Task<LiveThread> Reddit.Controllers.LiveThread.CreateAsync | ( | LiveThreadsConfigInput | liveThreadsConfigInput | ) |
Create a new live thread asynchronously.
liveThreadsConfigInput | A valid LiveThreadsConfigInput instance |
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.
title | a string no longer than 120 characters |
description | raw markdown text |
nsfw | boolean value |
resources | raw markdown text |
|
protectedvirtual |
Implements Reddit.Controllers.Internal.Monitors.
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.
updateName | the Name of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603 |
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.
updateName | the Name of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603 |
void Reddit.Controllers.LiveThread.Edit | ( | LiveThreadsConfigInput | liveThreadsConfigInput | ) |
Configure the thread. Requires the settings permission for this thread.
liveThreadsConfigInput | A valid LiveThreadsConfigInput instance |
void Reddit.Controllers.LiveThread.Edit | ( | string | title, |
string | description, | ||
bool | nsfw, | ||
string | resources | ||
) |
Configure the thread. Requires the settings permission for this thread.
title | a string no longer than 120 characters |
description | raw markdown text |
nsfw | boolean value |
resources | raw markdown text |
async Task Reddit.Controllers.LiveThread.EditAsync | ( | LiveThreadsConfigInput | liveThreadsConfigInput | ) |
Configure the thread asynchronously. Requires the settings permission for this thread.
liveThreadsConfigInput | A valid LiveThreadsConfigInput instance |
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.
title | a string no longer than 120 characters |
description | raw markdown text |
nsfw | boolean value |
resources | raw markdown text |
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.
LiveUpdate Reddit.Controllers.LiveThread.GetUpdate | ( | string | updateId | ) |
Get details about a specific update in a live thread.
updateId | Update Id (not the Name; i.e. without the "LiveUpdate_" prefix) |
List<LiveUpdate> Reddit.Controllers.LiveThread.GetUpdates | ( | LiveThreadsGetUpdatesInput | liveThreadsGetUpdatesInput | ) |
Get a list of updates posted in this thread.
liveThreadsGetUpdatesInput | A valid LiveThreadsGetUpdatesInput instance |
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.
after | fullname of a thing |
before | fullname of a thing |
styleSr | subreddit name |
count | a positive integer (default: 0) |
limit | the maximum number of items desired (default: 25, maximum: 100) |
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.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
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.
name | the name of an existing user |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
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.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
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.
name | the name of an existing user |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
bool Reddit.Controllers.LiveThread.LiveThreadContributorsIsMonitored | ( | ) |
bool Reddit.Controllers.LiveThread.LiveThreadIsMonitored | ( | ) |
bool Reddit.Controllers.LiveThread.LiveThreadUpdatesIsMonitored | ( | ) |
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.
monitoringDelayMs | The number of milliseconds between each monitoring query; leave null to auto-manage |
monitoringBaseDelayMs | The number of milliseconds between each monitoring query PER THREAD (default: 1500) |
schedule | A list of one or more timeframes during which monitoring of this object will occur (default: 24/7) |
breakOnFailure | If true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false) |
monitoringExpiration | If set, monitoring will automatically stop after the specified DateTime is reached |
useCache | Whether to cache the IDs of the monitoring results to prevent duplicate fires (default: true) |
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.
monitoringDelayMs | The number of milliseconds between each monitoring query; leave null to auto-manage |
monitoringBaseDelayMs | The number of milliseconds between each monitoring query PER THREAD (default: 1500) |
schedule | A list of one or more timeframes during which monitoring of this object will occur (default: 24/7) |
breakOnFailure | If true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false) |
monitoringExpiration | If set, monitoring will automatically stop after the specified DateTime is reached |
useCache | Whether to cache the IDs of the monitoring results to prevent duplicate fires (default: true) |
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.
monitoringDelayMs | The number of milliseconds between each monitoring query; leave null to auto-manage |
monitoringBaseDelayMs | The number of milliseconds between each monitoring query PER THREAD (default: 1500) |
schedule | A list of one or more timeframes during which monitoring of this object will occur (default: 24/7) |
breakOnFailure | If true, an exception will be thrown when a monitoring query fails; leave null to keep current setting (default: false) |
monitoringExpiration | If set, monitoring will automatically stop after the specified DateTime is reached |
useCache | Whether to cache the IDs of the monitoring results to prevent duplicate fires (default: true) |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
void Reddit.Controllers.LiveThread.RemoveContributor | ( | string | user | ) |
Revoke another user's contributorship. Requires the manage permission for this thread.
user | fullname of an account |
async Task Reddit.Controllers.LiveThread.RemoveContributorAsync | ( | string | user | ) |
Revoke another user's contributorship asynchronously. Requires the manage permission for this thread.
user | fullname of an account |
void Reddit.Controllers.LiveThread.RemoveContributorInvite | ( | string | user | ) |
Revoke an outstanding contributor invite. Requires the manage permission for this thread.
user | fullname of an account |
async Task Reddit.Controllers.LiveThread.RemoveContributorInviteAsync | ( | string | user | ) |
Revoke an outstanding contributor invite asynchronously. Requires the manage permission for this thread.
user | fullname of an account |
void Reddit.Controllers.LiveThread.Report | ( | string | type | ) |
Report the thread for violating the rules of reddit.
type | one of (spam, vote-manipulation, personal-information, sexualizing-minors, site-breaking) |
async Task Reddit.Controllers.LiveThread.ReportAsync | ( | string | type | ) |
Asynchronously report the thread for violating the rules of reddit.
type | one of (spam, vote-manipulation, personal-information, sexualizing-minors, site-breaking) |
void Reddit.Controllers.LiveThread.SaveChanges | ( | ) |
Configure the thread. Requires the settings permission for this thread.
async Task Reddit.Controllers.LiveThread.SaveChangesAsync | ( | ) |
Configure the thread asynchronously. Requires the settings permission for this thread.
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.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
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.
name | the name of an existing user |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
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.
liveThreadsContributorInput | A valid LiveThreadsContributorInput instance |
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.
name | the name of an existing user |
permissions | permission description e.g. +update,+edit,-manage |
type | one of (liveupdate_contributor_invite, liveupdate_contributor) |
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.
updateId | the ID (Name) of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603 |
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.
updateId | the ID (Name) of a single update. e.g. LiveUpdate_ff87068e-a126-11e3-9f93-12313b0b3603 |
void Reddit.Controllers.LiveThread.Update | ( | string | body | ) |
Post an update to the thread. Requires the update permission for this thread.
body | raw markdown text |
async Task Reddit.Controllers.LiveThread.UpdateAsync | ( | string | body | ) |
Post an update to the thread asynchronously. Requires the update permission for this thread.
body | raw markdown text |
|
getset |
The announcement URL.
|
get |
List of live thread contributors.
|
getset |
When the live thread was created.
|
getset |
A description of the live thread.
|
getset |
The full LiveUpdateEvent data retrieved from the API.
|
getset |
The fullname of the live thread.
|
getset |
Icon URL for the live thread.
|
getset |
The ID36 of the live thread.
|
getset |
Whether the live thread is an announcement.
|
getset |
Whether the live thread is NSFW.
|
getset |
Live thread resources.
|
getset |
Live thread state.
|
getset |
Title of the live thread.
|
getset |
How many views the live thread has.
|
get |
List of live thread updates.
|
getset |
How many people are viewing the live thread right now.
|
getset |
Web socket URL (web sockets not yet supported by this library)
EventHandler<LiveThreadContributorsUpdateEventArgs> Reddit.Controllers.LiveThread.ContributorsUpdated |
Event handler for monitoring changes to the contributors list.
EventHandler<LiveThreadUpdateEventArgs> Reddit.Controllers.LiveThread.ThreadUpdated |
Event handler for monitoring changes to live thread for changes to its properties.
EventHandler<LiveThreadUpdatesUpdateEventArgs> Reddit.Controllers.LiveThread.UpdatesUpdated |
Event handler for monitoring live updates.