![]() |
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.
|
Public Member Functions | |
Wiki (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
void | AllowEditor (WikiPageEditorInput wikiPageEditorInput, string subreddit=null) |
Allow username to edit this wiki page. More... | |
async Task | AllowEditorAsync (WikiPageEditorInput wikiPageEditorInput, string subreddit=null) |
Asynchronously allow username to edit this wiki page. More... | |
void | DenyEditor (WikiPageEditorInput wikiPageEditorInput, string subreddit=null) |
Deny username to edit this wiki page. More... | |
async Task | DenyEditorAsync (WikiPageEditorInput wikiPageEditorInput, string subreddit=null) |
Asynchronously deny username to edit this wiki page. More... | |
void | Edit (WikiEditPageInput wikiEditPageInput, string subreddit=null) |
Edit a wiki page. More... | |
async Task | EditAsync (WikiEditPageInput wikiEditPageInput, string subreddit=null) |
Edit a wiki page asynchronously. More... | |
void | Create (WikiCreatePageInput wikiCreatePageInput, string subreddit=null) |
Create a wiki page. More... | |
async Task | CreateAsync (WikiCreatePageInput wikiCreatePageInput, string subreddit=null) |
Create a wiki page asynchronously. More... | |
StatusResult | Hide (WikiPageRevisionInput wikiPageRevisionInput, string subreddit=null) |
Toggle the public visibility of a wiki page revision. More... | |
async Task< StatusResult > | HideAsync (WikiPageRevisionInput wikiPageRevisionInput, string subreddit=null) |
Toggle the public visibility of a wiki page revision asynchronously. More... | |
void | Revert (WikiPageRevisionInput wikiPageRevisionInput, string subreddit=null) |
Revert a wiki page to revision. More... | |
async Task | RevertAsync (WikiPageRevisionInput wikiPageRevisionInput, string subreddit=null) |
Revert a wiki page to revision asynchronously. More... | |
object | Discussions (string page, SrListingInput srListingInput, string subreddit=null) |
Retrieve a list of discussions about this wiki page. This endpoint is a listing. More... | |
WikiPageListing | Pages (string subreddit=null) |
Retrieve a list of wiki pages in this subreddit. More... | |
WikiPageRevisionContainer | Revisions (SrListingInput srListingInput, string subreddit=null) |
Retrieve a list of recently changed wiki pages in this subreddit. More... | |
WikiPageRevisionContainer | PageRevisions (string page, SrListingInput srListingInput, string subreddit=null) |
Retrieve a list of revisions of this wiki page. This endpoint is a listing. More... | |
WikiPageSettingsContainer | GetPermissions (string page, string subreddit=null) |
Retrieve the current permission settings for page. More... | |
WikiPageSettingsContainer | UpdatePermissions (string page, WikiUpdatePermissionsInput wikiUpdatePermissionsInput, string subreddit=null) |
Update the permissions and visibility of wiki page. More... | |
async Task< WikiPageSettingsContainer > | UpdatePermissionsAsync (string page, WikiUpdatePermissionsInput wikiUpdatePermissionsInput, string subreddit=null) |
Update the permissions and visibility of wiki page asynchronously. More... | |
WikiPageSettingsContainer | UpdatePermissions (string page, WikiPageSettings wikiPageSettings, string subreddit=null) |
Update the permissions and visibility of wiki page. More... | |
async Task< WikiPageSettingsContainer > | UpdatePermissionsAsync (string page, WikiPageSettings wikiPageSettings, string subreddit=null) |
Update the permissions and visibility of wiki page asynchronously. More... | |
WikiPageContainer | Page (string page, WikiPageContentInput wikiPageContentInput, string subreddit=null) |
Return the content of a wiki page. If v is given, show the wiki page as it was at that version. If both v and v2 are given, show a diff of the two. More... | |
![]() | |
BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
string | Sr (string subreddit) |
![]() | |
Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
T | SendRequest< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded") |
async Task< T > | SendRequestAsync< T > (string url, dynamic parameters, Method method=Method.GET, string contentType="application/x-www-form-urlencoded") |
RestRequest | PrepareIDRequest (string path, string id, Method method=Method.POST) |
RestRequest | PrepareJSONRequest (string path, Method method=Method.POST) |
RestRequest | PrepareRequest (string url, Method method=Method.GET, string contentType="application/x-www-form-urlencoded") |
RestRequest | PrepareRequest (string url, Method method, List< Parameter > parameters, List< FileParameter > files, string contentType="application/x-www-form-urlencoded") |
RestRequest | PrepareRequest (RestRequest restRequest, string contentType="application/x-www-form-urlencoded") |
string | GetVersion () |
string | ExecuteRequest (string url, Method method=Method.GET) |
async Task< string > | ExecuteRequestAsync (string url, Method method=Method.GET) |
string | ExecuteRequest (RestRequest restRequest) |
async Task< string > | ExecuteRequestAsync (RestRequest restRequest) |
void | UpdateAccessToken (string accessToken) |
void | UpdateRequests (List< DateTime > requests) |
void | AddParamIfNotNull (string name, dynamic value, ref RestRequest restRequest) |
Additional Inherited Members | |
![]() | |
virtual void | OnTokenUpdated (TokenUpdateEventArgs e) |
virtual void | OnRequestsUpdated (RequestsUpdateEventArgs e) |
![]() | |
EventHandler< TokenUpdateEventArgs > | TokenUpdated |
EventHandler< RequestsUpdateEventArgs > | RequestsUpdated |
Reddit.Models.Wiki.Wiki | ( | string | appId, |
string | appSecret, | ||
string | refreshToken, | ||
string | accessToken, | ||
ref RestClient | restClient, | ||
string | deviceId = null , |
||
string | userAgent = null |
||
) |
void Reddit.Models.Wiki.AllowEditor | ( | WikiPageEditorInput | wikiPageEditorInput, |
string | subreddit = null |
||
) |
Allow username to edit this wiki page.
wikiPageEditorInput | A valid WikiPageEditorInput instance |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Models.Wiki.AllowEditorAsync | ( | WikiPageEditorInput | wikiPageEditorInput, |
string | subreddit = null |
||
) |
Asynchronously allow username to edit this wiki page.
wikiPageEditorInput | A valid WikiPageEditorInput instance |
subreddit | The subreddit where the wiki lives |
void Reddit.Models.Wiki.Create | ( | WikiCreatePageInput | wikiCreatePageInput, |
string | subreddit = null |
||
) |
Create a wiki page.
wikiCreatePageInput | A valid WikiCreatePageInput instance |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Models.Wiki.CreateAsync | ( | WikiCreatePageInput | wikiCreatePageInput, |
string | subreddit = null |
||
) |
Create a wiki page asynchronously.
wikiCreatePageInput | A valid WikiCreatePageInput instance |
subreddit | The subreddit where the wiki lives |
void Reddit.Models.Wiki.DenyEditor | ( | WikiPageEditorInput | wikiPageEditorInput, |
string | subreddit = null |
||
) |
Deny username to edit this wiki page.
wikiPageEditorInput | A valid WikiPageEditorInput instance |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Models.Wiki.DenyEditorAsync | ( | WikiPageEditorInput | wikiPageEditorInput, |
string | subreddit = null |
||
) |
Asynchronously deny username to edit this wiki page.
wikiPageEditorInput | A valid WikiPageEditorInput instance |
subreddit | The subreddit where the wiki lives |
object Reddit.Models.Wiki.Discussions | ( | string | page, |
SrListingInput | srListingInput, | ||
string | subreddit = null |
||
) |
Retrieve a list of discussions about this wiki page. This endpoint is a listing.
page | the name of an existing wiki page |
srListingInput | A valid SrListingInput instance |
subreddit | The subreddit where the wiki lives |
void Reddit.Models.Wiki.Edit | ( | WikiEditPageInput | wikiEditPageInput, |
string | subreddit = null |
||
) |
Edit a wiki page.
wikiEditPageInput | A valid WikiEditPageInput instance |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Models.Wiki.EditAsync | ( | WikiEditPageInput | wikiEditPageInput, |
string | subreddit = null |
||
) |
Edit a wiki page asynchronously.
wikiEditPageInput | A valid WikiEditPageInput instance |
subreddit | The subreddit where the wiki lives |
WikiPageSettingsContainer Reddit.Models.Wiki.GetPermissions | ( | string | page, |
string | subreddit = null |
||
) |
Retrieve the current permission settings for page.
page | the name of an existing wiki page |
subreddit | The subreddit where the wiki lives |
StatusResult Reddit.Models.Wiki.Hide | ( | WikiPageRevisionInput | wikiPageRevisionInput, |
string | subreddit = null |
||
) |
Toggle the public visibility of a wiki page revision.
wikiPageRevisionInput | A valid WikiPageRevisionInput instance |
subreddit | The subreddit where the wiki lives |
async Task<StatusResult> Reddit.Models.Wiki.HideAsync | ( | WikiPageRevisionInput | wikiPageRevisionInput, |
string | subreddit = null |
||
) |
Toggle the public visibility of a wiki page revision asynchronously.
wikiPageRevisionInput | A valid WikiPageRevisionInput instance |
subreddit | The subreddit where the wiki lives |
WikiPageContainer Reddit.Models.Wiki.Page | ( | string | page, |
WikiPageContentInput | wikiPageContentInput, | ||
string | subreddit = null |
||
) |
Return the content of a wiki page. If v is given, show the wiki page as it was at that version. If both v and v2 are given, show a diff of the two.
page | the name of an existing wiki page |
wikiPageContentInput | A valid WikiPageContentInput instance |
subreddit | The subreddit where the wiki lives |
WikiPageRevisionContainer Reddit.Models.Wiki.PageRevisions | ( | string | page, |
SrListingInput | srListingInput, | ||
string | subreddit = null |
||
) |
Retrieve a list of revisions of this wiki page. This endpoint is a listing.
page | the name of an existing wiki page |
srListingInput | A valid SrListingInput instance |
subreddit | The subreddit where the wiki lives |
WikiPageListing Reddit.Models.Wiki.Pages | ( | string | subreddit = null | ) |
Retrieve a list of wiki pages in this subreddit.
subreddit | The subreddit where the wiki lives |
void Reddit.Models.Wiki.Revert | ( | WikiPageRevisionInput | wikiPageRevisionInput, |
string | subreddit = null |
||
) |
Revert a wiki page to revision.
wikiPageRevisionInput | A valid WikiPageRevisionInput instance |
subreddit | The subreddit where the wiki lives |
async Task Reddit.Models.Wiki.RevertAsync | ( | WikiPageRevisionInput | wikiPageRevisionInput, |
string | subreddit = null |
||
) |
Revert a wiki page to revision asynchronously.
wikiPageRevisionInput | A valid WikiPageRevisionInput instance |
subreddit | The subreddit where the wiki lives |
WikiPageRevisionContainer Reddit.Models.Wiki.Revisions | ( | SrListingInput | srListingInput, |
string | subreddit = null |
||
) |
Retrieve a list of recently changed wiki pages in this subreddit.
srListingInput | A valid SrListingInput instance |
subreddit | The subreddit where the wiki lives |
WikiPageSettingsContainer Reddit.Models.Wiki.UpdatePermissions | ( | string | page, |
WikiPageSettings | wikiPageSettings, | ||
string | subreddit = null |
||
) |
Update the permissions and visibility of wiki page.
page | the name of an existing wiki page |
wikiPageSettings | A valid instance of WikiPageSettings |
subreddit | The subreddit where the wiki lives |
WikiPageSettingsContainer Reddit.Models.Wiki.UpdatePermissions | ( | string | page, |
WikiUpdatePermissionsInput | wikiUpdatePermissionsInput, | ||
string | subreddit = null |
||
) |
Update the permissions and visibility of wiki page.
page | the name of an existing wiki page |
wikiUpdatePermissionsInput | A valid WikiUpdatePermissionsInput instance |
subreddit | The subreddit where the wiki lives |
async Task<WikiPageSettingsContainer> Reddit.Models.Wiki.UpdatePermissionsAsync | ( | string | page, |
WikiPageSettings | wikiPageSettings, | ||
string | subreddit = null |
||
) |
Update the permissions and visibility of wiki page asynchronously.
page | the name of an existing wiki page |
wikiPageSettings | A valid instance of WikiPageSettings |
subreddit | The subreddit where the wiki lives |
async Task<WikiPageSettingsContainer> Reddit.Models.Wiki.UpdatePermissionsAsync | ( | string | page, |
WikiUpdatePermissionsInput | wikiUpdatePermissionsInput, | ||
string | subreddit = null |
||
) |
Update the permissions and visibility of wiki page asynchronously.
page | the name of an existing wiki page |
wikiUpdatePermissionsInput | A valid WikiUpdatePermissionsInput instance |
subreddit | The subreddit where the wiki lives |