Class: MultiReddit

MultiReddit


new MultiReddit()

A class representing a multireddit.

Example
// Get a multireddit belonging to a specific user
r.getUser('multi-mod').getMultireddit('coding_languages')

Methods


copy(options)

Copies this multireddit to the requester's own account.

Parameters:
Name Type Description
options object
Properties
Name Type Description
newName string

The new name for the copied multireddit

Returns:

A Promise for the newly-copied multireddit

Type
Promise
Example
r.getUser('multi-mod').getMultireddit('coding_languages').copy({newName: 'my_coding_languages_copy'})

rename(options)

Renames this multireddit.

Note: This method mutates this MultiReddit.

Parameters:
Name Type Description
options object
Properties
Name Type Description
newName string

The new name for this multireddit.

Returns:

A Promise that fulfills with this multireddit

Type
Promise
Example
r.getUser('multi-mod').getMultireddit('coding_languages').copy({newName: 'cookie_languages '})

edit(options)

Edits the properties of this multireddit.

Note: Any omitted properties here will simply retain their previous values.

Parameters:
Name Type Description
options object
Properties
Name Type Argument Description
name string <optional>

The name of the new multireddit. 50 characters max

description string <optional>

A description for the new multireddit, in markdown.

visibility string <optional>

The multireddit's visibility setting. One of private, public, hidden.

icon_name string <optional>

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 string <optional>

A six-digit RGB hex color, preceded by '#'

weighting_scheme string <optional>

One of 'classic', 'fresh'

Returns:

The updated version of this multireddit

Type
Promise
Example
r.getUser('not_an_aardvark').getMultireddit('cookie_languages').edit({visibility: 'hidden'})

addSubreddit(sub)

Adds a subreddit to this multireddit.

Parameters:
Name Type Description
sub Subreddit

The Subreddit object to add (or a string representing a subreddit name)

Returns:

A Promise that fulfills with this multireddit when the reuqest is complete

Type
Promise
Example
r.getUser('not_an_aardvark').getMultireddit('cookie_languages').addSubreddit('cookies')

removeSubreddit(sub)

Removes a subreddit from this multireddit.

Parameters:
Name Type Description
sub Subreddit

The Subreddit object to remove (or a string representing a subreddit name)

Returns:

A Promise that fulfills with this multireddit when the request is complete

Type
Promise
Example
r.getUser('not_an_aardvark').getMultireddit('cookie_languages').removeSubreddit('cookies')

delete()

Deletes this multireddit.

Returns:

A Promise that fulfills when this request is complete

Type
Promise
Example
r.getUser('not_an_aardvark').getMultireddit('cookie_languages').delete()