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 theSubredditWidgets
that this widget belongs to outdated. To remedy this, callrefresh()
.
- classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any
Return an instance of
cls
fromdata
.- Parameters
data – The structured data.
reddit – An instance of
Reddit
.