![]() |
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 | |
Multis (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null) | |
LabeledMultiContainer | Copy (MultiURLInput multiURLInput) |
Copy a multi. Responds with 409 Conflict if the target already exists. A "copied from ..." line will automatically be appended to the description. More... | |
List< LabeledMultiContainer > | Mine (bool expandSrs) |
Fetch a list of multis belonging to the current user. More... | |
List< LabeledMultiContainer > | User (string username, bool expandSrs) |
Fetch a list of public multis belonging to username. More... | |
void | Delete (string multipath, bool expandSrs) |
Delete a multi. More... | |
object | DeleteFilter (string filterpath, bool expandSrs) |
Delete a filter. More... | |
LabeledMultiContainer | Get (string multipath, bool expandSrs) |
Fetch a multi's data and subreddit list by name. More... | |
object | GetFilter (string filterpath, bool expandSrs) |
Get a filter. More... | |
LabeledMultiContainer | Create (string multipath, LabeledMultiSubmit model, bool expandSrs) |
Create a multi. Responds with 409 Conflict if it already exists. More... | |
object | CreateFilter (string filterpath, string model, bool expandSrs) |
Create a filter. Responds with 409 Conflict if it already exists. More... | |
LabeledMultiContainer | Update (string multipath, LabeledMultiSubmit model, bool expandSrs) |
Create or update a multi. More... | |
object | UpdateFilter (string filterpath, string model, bool expandSrs) |
Create or update a filter. More... | |
LabeledMultiDescriptionContainer | GetDescription (string multipath) |
Get a multi's description. More... | |
LabeledMultiDescriptionContainer | UpdateDescription (string multipath, string description) |
Change a multi's markdown description. More... | |
void | DeleteMultiSub (string multipath, string srName) |
Remove a subreddit from a multi. More... | |
object | DeleteFilterSub (string filterpath, string srName) |
Remove a subreddit from a filter. More... | |
NamedObj | GetMultiSub (string multipath, string srName) |
Get data about a subreddit in a multi. More... | |
object | GetFilterSub (string filterpath, string srName) |
Get data about a subreddit in a filter. More... | |
NamedObj | AddMultiSub (string multipath, string srName) |
Add a subreddit to a multi. More... | |
object | AddFilterSub (string filterpath, string srName, string model) |
Add a subreddit to a filter. 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.Multis.Multis | ( | string | appId, |
string | appSecret, | ||
string | refreshToken, | ||
string | accessToken, | ||
ref RestClient | restClient, | ||
string | deviceId = null , |
||
string | userAgent = null |
||
) |
object Reddit.Models.Multis.AddFilterSub | ( | string | filterpath, |
string | srName, | ||
string | model | ||
) |
Add a subreddit to a filter.
filterpath | filter url path |
srName | subreddit name |
model | json data: { "name": subreddit name, } |
NamedObj Reddit.Models.Multis.AddMultiSub | ( | string | multipath, |
string | srName | ||
) |
Add a subreddit to a multi.
multipath | multireddit url path |
srName | subreddit name |
LabeledMultiContainer Reddit.Models.Multis.Copy | ( | MultiURLInput | multiURLInput | ) |
Copy a multi. Responds with 409 Conflict if the target already exists. A "copied from ..." line will automatically be appended to the description.
multiURLInput | A valid MultiURLInput instance |
LabeledMultiContainer Reddit.Models.Multis.Create | ( | string | multipath, |
LabeledMultiSubmit | model, | ||
bool | expandSrs | ||
) |
Create a multi. Responds with 409 Conflict if it already exists.
multipath | multireddit url path |
model | json data: { "description_md": raw markdown text, "display_name": a string no longer than 50 characters, "icon_name": one of (art and design , ask , books , business , cars , comics , cute animals , diy , entertainment , food and drink , funny , games , grooming , health , life advice , military , models pinup , music , news , philosophy , pictures and gifs , science , shopping , sports , style , tech , travel , unusual stories , video , `, None), "key_color": a 6-digit rgb hex color, e.g. #AABBCC`, "subreddits": [ { "name": subreddit name, }, ... ], "visibility": one of (private , public , hidden ), "weighting_scheme": one of(classic , fresh ), } |
expandSrs | boolean value |
object Reddit.Models.Multis.CreateFilter | ( | string | filterpath, |
string | model, | ||
bool | expandSrs | ||
) |
Create a filter. Responds with 409 Conflict if it already exists.
filterpath | filter url path |
model | json data: { "description_md": raw markdown text, "display_name": a string no longer than 50 characters, "icon_name": one of (art and design , ask , books , business , cars , comics , cute animals , diy , entertainment , food and drink , funny , games , grooming , health , life advice , military , models pinup , music , news , philosophy , pictures and gifs , science , shopping , sports , style , tech , travel , unusual stories , video , `, None), "key_color": a 6-digit rgb hex color, e.g. #AABBCC`, "subreddits": [ { "name": subreddit name, }, ... ], "visibility": one of (private , public , hidden ), "weighting_scheme": one of(classic , fresh ), } |
expandSrs | boolean value |
void Reddit.Models.Multis.Delete | ( | string | multipath, |
bool | expandSrs | ||
) |
Delete a multi.
multipath | multireddit url path |
expandSrs | boolean value |
object Reddit.Models.Multis.DeleteFilter | ( | string | filterpath, |
bool | expandSrs | ||
) |
Delete a filter.
filterpath | filter url path |
expandSrs | boolean value |
object Reddit.Models.Multis.DeleteFilterSub | ( | string | filterpath, |
string | srName | ||
) |
Remove a subreddit from a filter.
filterpath | filter url path |
srName | subreddit name |
void Reddit.Models.Multis.DeleteMultiSub | ( | string | multipath, |
string | srName | ||
) |
Remove a subreddit from a multi.
multipath | multireddit url path |
srName | subreddit name |
LabeledMultiContainer Reddit.Models.Multis.Get | ( | string | multipath, |
bool | expandSrs | ||
) |
Fetch a multi's data and subreddit list by name.
multipath | multireddit url path |
expandSrs | boolean value |
LabeledMultiDescriptionContainer Reddit.Models.Multis.GetDescription | ( | string | multipath | ) |
Get a multi's description.
multipath | multireddit url path |
object Reddit.Models.Multis.GetFilter | ( | string | filterpath, |
bool | expandSrs | ||
) |
Get a filter.
filterpath | filter url path |
expandSrs | boolean value |
object Reddit.Models.Multis.GetFilterSub | ( | string | filterpath, |
string | srName | ||
) |
Get data about a subreddit in a filter.
filterpath | filter url path |
srName | subreddit name |
NamedObj Reddit.Models.Multis.GetMultiSub | ( | string | multipath, |
string | srName | ||
) |
Get data about a subreddit in a multi.
multipath | multireddit url path |
srName | subreddit name |
List<LabeledMultiContainer> Reddit.Models.Multis.Mine | ( | bool | expandSrs | ) |
Fetch a list of multis belonging to the current user.
expandSrs | boolean value |
LabeledMultiContainer Reddit.Models.Multis.Update | ( | string | multipath, |
LabeledMultiSubmit | model, | ||
bool | expandSrs | ||
) |
Create or update a multi.
multipath | multireddit url path |
model | json data: { "description_md": raw markdown text, "display_name": a string no longer than 50 characters, "icon_name": one of (art and design , ask , books , business , cars , comics , cute animals , diy , entertainment , food and drink , funny , games , grooming , health , life advice , military , models pinup , music , news , philosophy , pictures and gifs , science , shopping , sports , style , tech , travel , unusual stories , video , `, None), "key_color": a 6-digit rgb hex color, e.g. #AABBCC`, "subreddits": [ { "name": subreddit name, }, ... ], "visibility": one of (private , public , hidden ), "weighting_scheme": one of(classic , fresh ), } |
expandSrs | boolean value |
LabeledMultiDescriptionContainer Reddit.Models.Multis.UpdateDescription | ( | string | multipath, |
string | description | ||
) |
Change a multi's markdown description.
multipath | multireddit url path |
description | The new description markdown text |
object Reddit.Models.Multis.UpdateFilter | ( | string | filterpath, |
string | model, | ||
bool | expandSrs | ||
) |
Create or update a filter.
filterpath | filter url path |
model | json data: { "description_md": raw markdown text, "display_name": a string no longer than 50 characters, "icon_name": one of (art and design , ask , books , business , cars , comics , cute animals , diy , entertainment , food and drink , funny , games , grooming , health , life advice , military , models pinup , music , news , philosophy , pictures and gifs , science , shopping , sports , style , tech , travel , unusual stories , video , `, None), "key_color": a 6-digit rgb hex color, e.g. #AABBCC`, "subreddits": [ { "name": subreddit name, }, ... ], "visibility": one of (private , public , hidden ), "weighting_scheme": one of(classic , fresh ), } |
expandSrs | boolean value |
List<LabeledMultiContainer> Reddit.Models.Multis.User | ( | string | username, |
bool | expandSrs | ||
) |
Fetch a list of public multis belonging to username.
username | A valid, existing reddit username |
expandSrs | boolean value |