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.Models.Multis Class Reference
Inheritance diagram for Reddit.Models.Multis:
Reddit.Models.BaseModel Reddit.Models.Internal.Request

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< LabeledMultiContainerMine (bool expandSrs)
 Fetch a list of multis belonging to the current user. More...
 
List< LabeledMultiContainerUser (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...
 
- Public Member Functions inherited from Reddit.Models.BaseModel
 BaseModel (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
string Sr (string subreddit)
 
- Public Member Functions inherited from Reddit.Models.Internal.Request
 Request (string appId, string appSecret, string refreshToken, string accessToken, ref RestClient restClient, string deviceId=null, string userAgent=null)
 
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

- Protected Member Functions inherited from Reddit.Models.Internal.Request
virtual void OnTokenUpdated (TokenUpdateEventArgs e)
 
virtual void OnRequestsUpdated (RequestsUpdateEventArgs e)
 
- Events inherited from Reddit.Models.Internal.Request
EventHandler< TokenUpdateEventArgsTokenUpdated
 
EventHandler< RequestsUpdateEventArgsRequestsUpdated
 

Constructor & Destructor Documentation

◆ Multis()

Reddit.Models.Multis.Multis ( string  appId,
string  appSecret,
string  refreshToken,
string  accessToken,
ref RestClient  restClient,
string  deviceId = null,
string  userAgent = null 
)

Member Function Documentation

◆ AddFilterSub()

object Reddit.Models.Multis.AddFilterSub ( string  filterpath,
string  srName,
string  model 
)

Add a subreddit to a filter.

Parameters
filterpathfilter url path
srNamesubreddit name
modeljson data: { "name": subreddit name, }
Returns
(TODO - Untested)

◆ AddMultiSub()

NamedObj Reddit.Models.Multis.AddMultiSub ( string  multipath,
string  srName 
)

Add a subreddit to a multi.

Parameters
multipathmultireddit url path
srNamesubreddit name
Returns
An object containing the name of the added subreddit.

◆ Copy()

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.

Parameters
multiURLInputA valid MultiURLInput instance
Returns
An object containing the multireddit data.

◆ Create()

LabeledMultiContainer Reddit.Models.Multis.Create ( string  multipath,
LabeledMultiSubmit  model,
bool  expandSrs 
)

Create a multi. Responds with 409 Conflict if it already exists.

Parameters
multipathmultireddit url path
modeljson 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), }
expandSrsboolean value
Returns
An object containing the multireddit data.

◆ CreateFilter()

object Reddit.Models.Multis.CreateFilter ( string  filterpath,
string  model,
bool  expandSrs 
)

Create a filter. Responds with 409 Conflict if it already exists.

Parameters
filterpathfilter url path
modeljson 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), }
expandSrsboolean value
Returns
(TODO - Untested)

◆ Delete()

void Reddit.Models.Multis.Delete ( string  multipath,
bool  expandSrs 
)

Delete a multi.

Parameters
multipathmultireddit url path
expandSrsboolean value

◆ DeleteFilter()

object Reddit.Models.Multis.DeleteFilter ( string  filterpath,
bool  expandSrs 
)

Delete a filter.

Parameters
filterpathfilter url path
expandSrsboolean value
Returns
(TODO - Untested)

◆ DeleteFilterSub()

object Reddit.Models.Multis.DeleteFilterSub ( string  filterpath,
string  srName 
)

Remove a subreddit from a filter.

Parameters
filterpathfilter url path
srNamesubreddit name
Returns
(TODO - Untested)

◆ DeleteMultiSub()

void Reddit.Models.Multis.DeleteMultiSub ( string  multipath,
string  srName 
)

Remove a subreddit from a multi.

Parameters
multipathmultireddit url path
srNamesubreddit name

◆ Get()

LabeledMultiContainer Reddit.Models.Multis.Get ( string  multipath,
bool  expandSrs 
)

Fetch a multi's data and subreddit list by name.

Parameters
multipathmultireddit url path
expandSrsboolean value
Returns
A LabeledMultiContainer.

◆ GetDescription()

LabeledMultiDescriptionContainer Reddit.Models.Multis.GetDescription ( string  multipath)

Get a multi's description.

Parameters
multipathmultireddit url path
Returns
An object containing a description.

◆ GetFilter()

object Reddit.Models.Multis.GetFilter ( string  filterpath,
bool  expandSrs 
)

Get a filter.

Parameters
filterpathfilter url path
expandSrsboolean value
Returns
(TODO - Untested)

◆ GetFilterSub()

object Reddit.Models.Multis.GetFilterSub ( string  filterpath,
string  srName 
)

Get data about a subreddit in a filter.

Parameters
filterpathfilter url path
srNamesubreddit name
Returns
(TODO - Untested)

◆ GetMultiSub()

NamedObj Reddit.Models.Multis.GetMultiSub ( string  multipath,
string  srName 
)

Get data about a subreddit in a multi.

Parameters
multipathmultireddit url path
srNamesubreddit name
Returns
An object containing the subreddit name.

◆ Mine()

List<LabeledMultiContainer> Reddit.Models.Multis.Mine ( bool  expandSrs)

Fetch a list of multis belonging to the current user.

Parameters
expandSrsboolean value
Returns
A list of multis.

◆ Update()

LabeledMultiContainer Reddit.Models.Multis.Update ( string  multipath,
LabeledMultiSubmit  model,
bool  expandSrs 
)

Create or update a multi.

Parameters
multipathmultireddit url path
modeljson 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), }
expandSrsboolean value
Returns
An object containing the multireddit data.

◆ UpdateDescription()

LabeledMultiDescriptionContainer Reddit.Models.Multis.UpdateDescription ( string  multipath,
string  description 
)

Change a multi's markdown description.

Parameters
multipathmultireddit url path
descriptionThe new description markdown text
Returns
An object containing a description.

◆ UpdateFilter()

object Reddit.Models.Multis.UpdateFilter ( string  filterpath,
string  model,
bool  expandSrs 
)

Create or update a filter.

Parameters
filterpathfilter url path
modeljson 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), }
expandSrsboolean value
Returns
(TODO - Untested)

◆ User()

List<LabeledMultiContainer> Reddit.Models.Multis.User ( string  username,
bool  expandSrs 
)

Fetch a list of public multis belonging to username.

Parameters
usernameA valid, existing reddit username
expandSrsboolean value
Returns
A list of multis.

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