draw 1.1.0
draw: ^1.1.0 copied to clipboard
A fully-featured Reddit API wrapper for Dart, inspired by PRAW.
Change Log #
1.1.0 - 2023-03-13 #
- Added support for Dart 3.0
- Added
afterparameter toUser.subreddits
1.0.2 - 2021-09-01 #
- Fixed some failing null assertions
- Updated documentation
- Tests can now be run with sound null safety
1.0.1 - 2021-05-13 #
- Fix issue draw-dev/DRAW#192.
- Update package:ini dependency to null safe version.
1.0.0 - 2021-03-25 #
0.9.2 - 2021-03-25 #
- Fixed issues with
limitparameter for listing generators.
0.9.1 - 2020-01-09 #
- Fixed issue where
SubredditRef.searchwould throw a type error.
0.9.0 - 2019-11-22 #
0.8.0 - 2019-10-01 #
- Added support for Dart for Web and Flutter Web.
0.7.1 - 2019-08-26 #
- Added 'best' sorting option to
FrontPage. - Added
Reddit.restoreInstalledAuthenticatedInstancewhich allows for restoring an OAuth context created for an installed application instance that does not require a client secret.
0.7.0 - 2019-07-29 #
Breaking changes: #
- DRAW now requires a Dart SDK with version 2.2.2 or newer.
Other changes: #
- Added
isContinueThisThreadandisLoadMoreCommentsproperties toMoreCommentsto make it easier to differentiate between different types ofMoreCommentresponses from the Reddit API. - Added
Subredditsclass which contains streams for subreddits and subreddit search functionality. - Added
over18getter toSubreddit. - Added
afterparameter to stream generators. - Add
limitparameters to stream generators to change number of elements returned per request.
0.6.0 - 2019-07-08 #
Breaking changes: #
Reddit.restoreAuthenticatedInstancenow returnsRedditinstead ofFuture<Reddit>.
Other changes: #
Reddit.restoreAuthenticatedInstanceno longer throws an exception when not provided aclientSecret. AclientSecretis still required for most client types except for installed applications.- Updated dependencies.
0.5.2+1 - 2019-05-31 #
- Updated documentation.
0.5.2 - 2019-05-31 #
- Added optional
waitForResponsetoclearVote,downvote, andupvote, which allows for these calls to complete without waiting for a response from Reddit. - Added
Reddit.createInstalledFlowInstanceto help with authenticating installed applications with no client secret.
0.5.1+1 - 2019-05-17 #
- Fixed analysis issues.
0.5.1 - 2019-05-17 #
- Added basic implementation of
SubredditStyleSheetthat allows for simple stylesheet management. - Added
RedditorRef.trophiesmethod for retrieving user trophies. - Fixed issue where
MoreCommentswas not being correctly expanded to a subtree ofCommentForest - Fixed issue where
MoreCommentswas not being removed from aCommentForestafter being expanded. - Miscellaneous documentation updates.
0.5.0 - 2019-01-07 #
Dart SDK 2.1 or newer is now required to use DRAW.
Breaking changes: #
- All mixin classes have been updated to use the new
mixinkeyword. - Removed the following deprecated fields:
likesproperty inSubmission.gildedproperty inUserContentInitialized.
0.4.6 - 2019-11-02 #
- Added support for handling wiki pages:
- Added
SubredditWiki, which provides a set of wiki related functions toSubredditRefandSubreddit. - Added
WikiPageRefandWikiPagewhich represent and allow for modification of wiki pages. - Added
WikiEdit, a class which represents edits made to a wiki page. - Added
WikiPermissionLevelenum, 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.
Deprecation Notice (Removal in 0.5.0) #
- Marked
gildedproperty ofUserContentInitializedas deprecated.
0.4.5 - 2019-10-20 #
- Added
ModeratorRelationship, a class that allows for management of moderators for a subreddit. - Added
moderatorparameter toSubredditthat returns an instance ofModeratorRelationshipfor the given subreddit. - Added
sortparameter toSubmission.refreshCommentsto allow for different comment sorting methods.
0.4.4 - 2019-10-06 #
- Added
Modmail,ModmailConversation,ModmailMessage,ModmailActionandModmailActionType, which can be used to perform mod-mail actions. - Added
votegetter toSubmissionto be consistent withComment.
Deprecation Notice (Removal in 0.5.0) #
- Marked
likesgetter inSubmissionas deprecated.
0.4.3 - 2019-09-23 #
- Added
nsfwandspoilerparameters toSubreddit.submit(Thanks @LucasCLuk!) - Fixed issue where exceptions generated during client authentication could not be caught.
0.4.2 - 2018-09-10 #
- Added support for flair. See documentation for
SubredditFlairandSubmissionFlairfor details. - Updated dependency versions for Dart 2.0.
Bug fixes:
PreviewImagenow automatically replaces$amp;with$(Issue #104).- Cleaned up various analyzer failures.
0.4.0 - 2018-09-01 #
Major breaking changes: #
Reddit.createInstance has been removed. Please use one of the following static methods instead:
createReadOnlyInstancecreateScriptInstancecreateUntrustedReadOnlyInstancecreateWebFlowInstancerestoreAuthenticatedInstance
Other changes: #
- Bumped SDK constraints to reflect official Dart 2.0 release.
- Added
SubmissionPreviewandPreviewImagewhich represent preview images for aSubmission. - Added
previewtoSubmission, which returns aList<SubmissionPreview>. - Fixed various bugs discovered while improving code coverage.
0.3.4 - 2018-06-12 #
Deprecation Notice: #
Reddit.createInstance has been deprecated and will be removed in the 0.4.0 release. Please use one of the following static methods instead:
createReadOnlyInstancecreateScriptInstancecreateUntrustedReadOnlyInstancecreateWebFlowInstancerestoreAuthenticatedInstance
Other changes: #
- Added the following static methods to
Reddit:createWebFlowInstance
- Added live tests to exercise the web implicit grant flow authentication mode.
0.3.3 - 2018-06-08 #
-
Added the following static methods to
Reddit:createReadOnlyInstancecreateScriptInstancecreateUntrustedReadOnlyInstance
This should make creating
Redditinstances simpler and easier to debug. -
Added live tests to exercise the read-only and script authentication modes.
0.3.2 - 2018-05-07 #
Bug fixes:
- Fixed additional Dart 2 runtime type errors.
0.3.1 - 2018-05-06 #
Bug fixes:
- Fixed exception thrown from
WebAuthenticatorwhen running in Dart 2.
0.3.0 - 2018-05-05 #
Major breaking changes: #
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.
Functionality: #
- Basic
Multiredditfunctionality:- Added
Multireddit.parse(reddit, data)constructor that will create an instance of aMultireddit, given the correctMapofdata. - Added
add(subreddit)method to add the correspondingsubredditto the instance ofMultireddit.subredditcan be of typeSubredditorString. - Added
delete()method to delete the multireddit. - Added
copy()andcopy(multiName), this will create a copy of theMultiredditfor for the currently authenticated user and return an instance of the newMultiredditencapsulated as aFuture. WhenmultiNameis provided it will set the display name of the newMultireddittomultiName. - Added getters for the following properties:
keyColor,iconName,subreddits,authordisplayName,visibility,weightingScheme,canEdit,over18.
- Added
- Comment and Submission moderation.
- Miscellaneous bug fixes.
0.2.1 - 2018-04-17 #
- Added
Reddit.comment, which allows for the creation ofCommentRefobjects from a comment ID or url. - Added
CommentRef.populateandComment.refresh. - Added
likesgetter toSubmission. - Miscellaneous fixes for minor bugs related to
CommentForest.
0.2.0 - 2018-04-13 #
Breaking changes:
Subreddit.submissionshas 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.
0.1.6 - 2018-04-08 #
- Added the property
Reddit.front, which exposes methods to retrieve content from the Reddit front page.
0.1.5 - 2018-04-03 #
- Added
Reddit.restoreAuthenticatedInstance, which can be used to create a Reddit instance from previously cached credentials. - Documentation improvements.
- Various bug fixes.
0.1.4 - 2018-03-31 #
- Added
SubredditModeration, a class which implements moderator functionality forSubreddits. - Fixed issue #46 which was causing
WebAuthenticator.urlto hit an assertion whencompactLoginwas set totrue.
0.1.3 - 2018-03-22 #
- Added additional convenience accessors to various classes, including
Comment,Redditor,Submission, andSubreddit. - Added classes
SubredditFiltersandSubredditQuarantine.
0.1.2 - 2018-03-04 #
Breaking changes:
- Removed
propertymethod. Properties of initialized objects that do not yet have convenience accessors can be accessed through thedataproperty - Removed
fullname,id, anddatafields from lazily initialized objects - Removed
refresh()from lazily initialized objects
Miscellaneous:
- Improved documentation
- Various internal refactoring
0.1.1 - 2018-03-03 #
Minor bug fix:
- Fixed issue where
DRAWConfigContextwould throw an exception on Android and iOS.
0.1.0 - 2018-03-03 #
Breaking changes:
- Created separate classes for lazily initialized and initialized instances
- Deprecated the
propertymethod. Will be completely removed in the near future
Major changes and bug fixes:
- Added
InboxandMessagefunctionality - Added convenience accessors for common properties. Properties without an accessor can be accessed
through the
datamap in each object - Additional fixes to
DRAWConfigContext - Rolled
package:quiverforward to version0.28.0to match that used byflutter_test
0.0.3 - 2018-01-22 #
Minor changes and bug fixes:
- Fixed bug that caused authentication to fail when using
draw.iniwith theScriptAuthenticator - Refactored
DRAWConfigContext
0.0.2 - 2017-12-15 #
Minor updates:
- Added
CHANGELOG.md - Formatted sample code in
README.md - Renamed
.analysis_optionstoanalysis_options.yaml - Documentation added for classes and methods that had none
- Commented out currently unimplemented functionality to clean up generated documents
0.0.1 - 2017-12-08 #
Initial release with basic functionality, including:
- OAuth2 support for login
Comment,Redditor, andSubredditinterfaces