draw library

Classes

Authenticator
The Authenticator class provides an interface to interact with the Reddit API using OAuth2. An Authenticator is responsible for keeping track of OAuth2 credentials, refreshing and revoking access tokens, and issuing HTTPS requests using OAuth2 credentials.
Comment
A fully initialized class which represents a single Reddit comment.
CommentForest
A user-friendly representation of a forest of Comment objects.
CommentHelper
CommentModeration
Provides a set of moderation functions for a Comment.
CommentRef
A lazily initialized class which represents a single Reddit comment. Can be promoted to a Comment.
ContributorRelationship
Provides methods to interact with a Subreddit's contributors.
Flair
A simple representation of Reddit flair.
FlairTemplate
A simple representation of a template for Reddit flair.
FrontPage
The FrontPage class provides methods to access listings of content on the Reddit front page.
Inbox
A utility class used to interact with the Reddit inbox.
Message
A fully initialized class which represents a Message from the Inbox.
ModeratorAction
Represents an action taken by a moderator.
ModeratorRelationship
Provides methods to interact with a Subreddit's moderators.
Modmail
Provides modmail functions for a Subreddit.
ModmailAction
A class that represents an action taken by a moderator in a ModmailConversation.
ModmailConversation
A fully initialized class which represents a Modmail conversation.
ModmailConversationRef
A lazily initialized class which represents a Modmail conversation. Can be promoted to a ModmailConversation.
ModmailMessage
A class that represents a message from a ModmailConversation.
ModmailUnreadStatistics
A representation of the number of unread Modmail conversations by state.
MoreComments
Represents comments which have been collapsed under a 'load more comments' or 'continue this thread' section.
Multireddit
A class which represents a Multireddit, which is a collection of Subreddits.
Objector
Converts responses from the Reddit API into instances of RedditBase.
PreviewImage
A representation of the properties of a Submission's preview image.
ReadOnlyAuthenticator
The ReadOnlyAuthenticator class allows for the creation of an Authenticator instance which is not associated with any reddit account. As the name implies, the ReadOnlyAuthenticator can only be used to make read-only requests to the Reddit API that do not require access to a valid Reddit user account. Refer to Reddit's documentation for descriptions of valid app types.
Reddit
The Reddit class provides access to Reddit's API and stores session state for the current Reddit instance. This class contains objects that can be used to interact with Reddit posts, comments, subreddits, multireddits, and users.
RedditBase
A base class for most DRAW objects which handles lazy-initialization of objects and Reddit API request state.
RedditBaseInitializedMixin
Redditor
A fully initialized class representing a particular Reddit user, also known as a Redditor.
RedditorRef
A lazily initialized class representing a particular Reddit user, also known as a Redditor. Can be promoted to a Redditor.
RedditorStream
Provides Comment and Submission streams for a particular Redditor.
Rule
A wrapper class for a Rule of a Subreddit.
ScriptAuthenticator
The ScriptAuthenticator class allows for the creation of an Authenticator instance which is associated with a valid Reddit user account. This is to be used with the 'Script' app type credentials. Refer to Reddit's documentation for descriptions of valid app types.
StyleSheet
Represents stylesheet information for a Subreddit.
StyleSheetImage
A representation of an image associated with a Subreddit's StyleSheet.
SubListing
Submission
A fully initialized representation of a standard Reddit submission.
SubmissionFlair
Provides functionality for setting flair for this Submission.
SubmissionModeration
Provides a set of moderation functions for a Submisson.
SubmissionPreview
A representation of a submission's preview.
SubmissionRef
A lazily initialized representation of a standard Reddit submission. Can be promoted to a Submission.
Subreddit
A class representing a particular Reddit community, also known as a Subreddit.
SubredditFilters
Provides functions to interact with the special Subreddit's filters.
SubredditFlair
Provides a set of functions to interact with a Subreddit's flair.
SubredditFlairTemplates
Provides functions to interact with a Subreddit's flair templates.
SubredditLinkFlairTemplates
Provides functions to interact with link flair templates.
SubredditModeration
Provides a set of moderation functions to a Subreddit. You must be a mod of the subreddit to acess these.
SubredditQuarantine
Provides subreddit quarantine related methods.
SubredditRedditorFlairTemplates
Provides functions to interact with Redditor flair templates.
SubredditRef
A lazily initialized class representing a particular Reddit community, also known as a Subreddit. Can be promoted to a Subreddit object.
SubredditRelationship
Represents a relationship between a Redditor and a Subreddit.
SubredditSettings
A structure which represents the settings of a Subreddit.
SubredditStream
Provides Comment and Submission streams for the subreddit.
SubredditStyleSheet
Provides a set of stylesheet functions to a Subreddit.
SubredditTraffic
Contains Subreddit traffic information for a specific time slice. uniques is the number of unique visitors during the period, pageviews is the total number of page views during the period, and subscriptions is the total number of new subscriptions during the period. subscriptions is only non-zero for time slices the length of one day. All time slices are in UTC time and can be found in periodStart, with valid slices being either one hour, one day, or one month.
SubredditWiki
Provides a set of wiki functions to a Subreddit.
Trophy
A Class representing an award or trophy
User
The User class provides methods to access information about the currently authenticated user.
UserContent
An abstract base class for user created content, which is one of Submission or Comment.
WebAuthenticator
The WebAuthenticator class allows for the creation of an Authenticator that exposes functionality which allows for the user to authenticate through a browser. The url method is used to generate the URL that the user uses to authenticate on www.reddit.com, and the authorize method retrieves the access token given the returned code. This is to be used with the 'Web' app type credentials. Refer to Reddit's documentation for descriptions of valid app types.
WikiEdit
A representation of edits made to a WikiPage.
WikiPage
A representation of a subreddit's wiki page.
WikiPageModeration
Provides a set of moderation functions for a WikiPageRef.
WikiPageRef
A lazily initialized object which represents a subreddit's wiki page. Can be promoted to a populated WikiPage.
WikiPageSettings
Contains the current settings of a WikiPageRef.

Mixins

BaseListingMixin
A mixin with common listing functionality, including ListingGenerator creation and standard listing requests by Sort type.
EditableMixin
Interface for classes that can be edited and deleted.
GildableMixin
Interface for classes that can be gilded.
GildedListingMixin
A mixin which contains the functionality required to get a Stream of gilded content.
InboxableMixin
A mixin containing inbox functionality.
InboxToggleableMixin
Interface for classes that can optionally receive inbox replies.
MessageableMixin
A mixin containing functionality to send messages to other Redditors or Subreddit moderators.
RedditorListingMixin
A mixin which provides the ability to get Redditor related streams.
ReplyableMixin
A mixin for RedditBase classes that can be replied to.
ReportableMixin
Interface for ReddieBase classes that can be reported.
RisingListingMixin
SaveableMixin
Mixin for RedditBase classes that can be saved.
SubredditListingMixin
UserContentInitialized
UserContentModerationMixin
Provides moderation methods for Comments and Submissions.
VoteableMixin
A mixin which provides voting functionality for Comment and Submission.

Exceptions / Errors

DRAWArgumentError
Thrown due to invalid arguments being provided to a DRAW method.
DRAWAuthenticationError
Thrown when there is an error during the authentication flow.
DRAWClientError
Thrown due to a error on the side of the client due to incorrect integration of DRAW.
DRAWGildingException
Thrown if a call to gild a Comment, Redditor, or Submission fails.
DRAWImageUploadException
Thrown if an image upload fails.
DRAWInternalError
Thrown due to a fatal error encountered inside DRAW. If you're not adding functionality to DRAW you should never see this. Otherwise, please file a bug at github.com/draw-dev/DRAW/issues.
DRAWInvalidCommentException
Thrown when a request is made with an invalid comment ID.
DRAWInvalidRedditorException
Thrown when a request is made with an invalid Redditor name.
DRAWInvalidSubmissionException
Thrown when a request is made with an invalid submission ID.
DRAWInvalidSubredditException
Thrown when a request is made with an invalid Subreddit name.
DRAWNotFoundException
Thrown when a Reddit object could not be found.
DRAWRedirectResponse
Thrown when a redirect is requested after a network call. Used to notify various APIs that additional work needs to be done.
DRAWUnimplementedError
Thrown by unfinished code that hasn't yet implemented all the features it needs.
DRAWUnknownResponseException
Thrown due to an unexpected response from Reddit. If you're not adding functionality to DRAW you should never see this. Otherwise, please file a bug at github.com/draw-dev/DRAW/issues.