- Added support for Dart 3.0
- Added
after
parameter toUser.subreddits
- Fixed some failing null assertions
- Updated documentation
- Tests can now be run with sound null safety
- Fix issue #192.
- Update package:ini dependency to null safe version.
- DRAW now requires a Dart SDK with version 2.12.0 or newer.
- Add null-safety support.
- Miscellaneous refactoring and analysis hint cleanup.
- Fixed issues with
limit
parameter for listing generators.
- Fixed issue where
SubredditRef.search
would throw a type error.
- HTTP methods exposed through
Reddit
now only acceptMap<String, String>
for body arguments.
- Added support for uploading images for subreddit theming in
SubredditStyleSheet
.
- Added support for Dart for Web and Flutter Web.
- Added 'best' sorting option to
FrontPage
. - Added
Reddit.restoreInstalledAuthenticatedInstance
which allows for restoring an OAuth context created for an installed application instance that does not require a client secret.
- DRAW now requires a Dart SDK with version 2.2.2 or newer.
- Added
isContinueThisThread
andisLoadMoreComments
properties toMoreComments
to make it easier to differentiate between different types ofMoreComment
responses from the Reddit API. - Added
Subreddits
class which contains streams for subreddits and subreddit search functionality. - Added
over18
getter toSubreddit
. - Added
after
parameter to stream generators. - Add
limit
parameters to stream generators to change number of elements returned per request.
Reddit.restoreAuthenticatedInstance
now returnsReddit
instead ofFuture<Reddit>
.
Reddit.restoreAuthenticatedInstance
no longer throws an exception when not provided aclientSecret
. AclientSecret
is still required for most client types except for installed applications.- Updated dependencies.
- Updated documentation.
- Added optional
waitForResponse
toclearVote
,downvote
, andupvote
, which allows for these calls to complete without waiting for a response from Reddit. - Added
Reddit.createInstalledFlowInstance
to help with authenticating installed applications with no client secret.
- Fixed analysis issues.
- Added basic implementation of
SubredditStyleSheet
that allows for simple stylesheet management. - Added
RedditorRef.trophies
method for retrieving user trophies. - Fixed issue where
MoreComments
was not being correctly expanded to a subtree ofCommentForest
- Fixed issue where
MoreComments
was not being removed from aCommentForest
after being expanded. - Miscellaneous documentation updates.
Dart SDK 2.1 or newer is now required to use DRAW.
- All mixin classes have been updated to use the new
mixin
keyword. - Removed the following deprecated fields:
likes
property inSubmission
.gilded
property inUserContentInitialized
.
- Added support for handling wiki pages:
- Added
SubredditWiki
, which provides a set of wiki related functions toSubredditRef
andSubreddit
. - Added
WikiPageRef
andWikiPage
which represent and allow for modification of wiki pages. - Added
WikiEdit
, a class which represents edits made to a wiki page. - Added
WikiPermissionLevel
enum, which describes all valid permissions available to control editing and viewing of wiki pages. - Added
WikiPageSettings
, a representation of all settings for a wiki page. - Added
WikiPageModeration
, a helper class for updating settings for a wiki page.
- Added
- Added support for new Reddit Silver, Gold, and Platinum.
- Marked
gilded
property ofUserContentInitialized
as deprecated.
- Added
ModeratorRelationship
, a class that allows for management of moderators for a subreddit. - Added
moderator
parameter toSubreddit
that returns an instance ofModeratorRelationship
for the given subreddit. - Added
sort
parameter toSubmission.refreshComments
to allow for different comment sorting methods.
- Added
Modmail
,ModmailConversation
,ModmailMessage
,ModmailAction
andModmailActionType
, which can be used to perform mod-mail actions. - Added
vote
getter toSubmission
to be consistent withComment
.
- Marked
likes
getter inSubmission
as deprecated.
- Added
nsfw
andspoiler
parameters toSubreddit.submit
(Thanks @LucasCLuk!) - Fixed issue where exceptions generated during client authentication could not be caught.
- Added support for flair. See documentation for
SubredditFlair
andSubmissionFlair
for details. - Updated dependency versions for Dart 2.0.
Bug fixes:
PreviewImage
now automatically replaces$amp;
with$
(Issue #104).- Cleaned up various analyzer failures.
Reddit.createInstance
has been removed. Please use one of the following static methods instead:
createReadOnlyInstance
createScriptInstance
createUntrustedReadOnlyInstance
createWebFlowInstance
restoreAuthenticatedInstance
- Bumped SDK constraints to reflect official Dart 2.0 release.
- Added
SubmissionPreview
andPreviewImage
which represent preview images for aSubmission
. - Added
preview
toSubmission
, which returns aList<SubmissionPreview>
. - Fixed various bugs discovered while improving code coverage.
Reddit.createInstance
has been deprecated and will be removed in the 0.4.0 release. Please use one of the following static methods instead:
createReadOnlyInstance
createScriptInstance
createUntrustedReadOnlyInstance
createWebFlowInstance
restoreAuthenticatedInstance
- Added the following static methods to
Reddit
:createWebFlowInstance
- Added live tests to exercise the web implicit grant flow authentication mode.
-
Added the following static methods to
Reddit
:createReadOnlyInstance
createScriptInstance
createUntrustedReadOnlyInstance
This should make creating
Reddit
instances simpler and easier to debug. -
Added live tests to exercise the read-only and script authentication modes.
Bug fixes:
- Fixed additional Dart 2 runtime type errors.
Bug fixes:
- Fixed exception thrown from
WebAuthenticator
when running in Dart 2.
Dropped support for Dart 1.x. Flutter has moved to enable Dart 2 by default which required some changes in DRAW that are not compatible with Dart 1.x. Some of these changes required some method signatures to be modified, but this shouldn't require any changes for users.
If running in a command-line script, that script must be run using a dev SDK
while passing the --preview-dart-2
flag.
If used in a Flutter application, --preview-dart-2
is enabled by default as
of the Flutter Beta 2 release.
- Basic
Multireddit
functionality:- Added
Multireddit.parse(reddit, data)
constructor that will create an instance of aMultireddit
, given the correctMap
ofdata
. - Added
add(subreddit)
method to add the correspondingsubreddit
to the instance ofMultireddit
.subreddit
can be of typeSubreddit
orString
. - Added
delete()
method to delete the multireddit. - Added
copy()
andcopy(multiName)
, this will create a copy of theMultireddit
for for the currently authenticated user and return an instance of the newMultireddit
encapsulated as aFuture
. WhenmultiName
is provided it will set the display name of the newMultireddit
tomultiName
. - Added getters for the following properties:
keyColor
,iconName
,subreddits
,author
displayName
,visibility
,weightingScheme
,canEdit
,over18
.
- Added
- Comment and Submission moderation.
- Miscellaneous bug fixes.
- Added
Reddit.comment
, which allows for the creation ofCommentRef
objects from a comment ID or url. - Added
CommentRef.populate
andComment.refresh
. - Added
likes
getter toSubmission
. - Miscellaneous fixes for minor bugs related to
CommentForest
.
Breaking changes:
Subreddit.submissions
has been removed as the Reddit API endpoint no longer exists. See this post for context.
Miscellaneous:
- Added initial support for Fuchsia. draw.ini configurations are not yet supported on this platform.
- Loosened some version restrictions for pub packages.
- Added the property
Reddit.front
, which exposes methods to retrieve content from the Reddit front page.
- Added
Reddit.restoreAuthenticatedInstance
, which can be used to create a Reddit instance from previously cached credentials. - Documentation improvements.
- Various bug fixes.
- Added
SubredditModeration
, a class which implements moderator functionality forSubreddit
s. - Fixed issue #46 which was causing
WebAuthenticator.url
to hit an assertion whencompactLogin
was set totrue
.
- Added additional convenience accessors to various classes, including
Comment
,Redditor
,Submission
, andSubreddit
. - Added classes
SubredditFilters
andSubredditQuarantine
.
Breaking changes:
- Removed
property
method. Properties of initialized objects that do not yet have convenience accessors can be accessed through thedata
property - Removed
fullname
,id
, anddata
fields from lazily initialized objects - Removed
refresh()
from lazily initialized objects
Miscellaneous:
- Improved documentation
- Various internal refactoring
Minor bug fix:
- Fixed issue where
DRAWConfigContext
would throw an exception on Android and iOS.
Breaking changes:
- Created separate classes for lazily initialized and initialized instances
- Deprecated the
property
method. Will be completely removed in the near future
Major changes and bug fixes:
- Added
Inbox
andMessage
functionality - Added convenience accessors for common properties. Properties without an accessor can be accessed
through the
data
map in each object - Additional fixes to
DRAWConfigContext
- Rolled
package:quiver
forward to version0.28.0
to match that used byflutter_test
Minor changes and bug fixes:
- Fixed bug that caused authentication to fail when using
draw.ini
with theScriptAuthenticator
- Refactored
DRAWConfigContext
Minor updates:
- Added
CHANGELOG.md
- Formatted sample code in
README.md
- Renamed
.analysis_options
toanalysis_options.yaml
- Documentation added for classes and methods that had none
- Commented out currently unimplemented functionality to clean up generated documents
Initial release with basic functionality, including:
- OAuth2 support for login
Comment
,Redditor
, andSubreddit
interfaces