Widget

class praw.models.Widget(reddit: praw.Reddit, _data: Dict[str, Any])

Base class to represent a Widget.

__init__(reddit: praw.Reddit, _data: Dict[str, Any])

Initialize a Widget instance.

mod() praw.models.WidgetModeration

Get an instance of WidgetModeration for this widget.

Note

Using any of the methods of WidgetModeration will likely make the data in the SubredditWidgets that this widget belongs to outdated. To remedy this, call refresh().

classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any

Return an instance of cls from data.

Parameters
  • data – The structured data.

  • reddit – An instance of Reddit.