SubredditCollectionsModeration

class praw.models.reddit.collections.SubredditCollectionsModeration(reddit, sub_fullname, _data=None)

Class to represent moderator actions on a Subreddit’s Collections.

Obtain an instance via:

reddit.subreddit('SUBREDDIT').collections.mod
__init__(reddit, sub_fullname, _data=None)

Initialize the SubredditCollectionsModeration instance.

create(title, description)

Create a new Collection.

The authenticated account must have appropriate moderator permissions in the subreddit this collection belongs to.

Parameters:
  • title – The title of the collection, up to 300 characters.
  • description – The description, up to 500 characters.
Returns:

The newly created Collection.

Example usage:

my_sub = reddit.subreddit('SUBREDDIT')
new_collection = my_sub.collections.mod.create('Title', 'desc')
new_collection.mod.add_post('bgibu9')

See also delete().

classmethod parse(data, reddit)

Return an instance of cls from data.

Parameters:
  • data – The structured data.
  • reddit – An instance of Reddit.