- Add more submit options
- Get flair selections for subreddit
- Add join_requests state to new modmail
- Allow custom logger to be supplied via config
- Added catch-all options for
Subreddit#editSettings
- TS: added
appeals
value to new modmail count - TS: fixed typo in
Subreddit#submitSelfpost
- TS: added type definition for
snoowrap#getContentByIds
- TS: more properties to
SubmitLinkOptions
interface - TS: more properties to
SearchOptions
interface - TS: added
removed_by_category
property toSubmission
- TS: fixed
snoowrap#getPopularSubreddits
typo - Fix missing commas in JSDoc examples
- Fix
window.location
usage in JSDoc - Test: fixed failing test suite
- Added
permanent
option tosnoowrap#applicationOnlyAuth
- Added
ModmailConversation#reply()
- TS: Added
snoowrap#getBest()
definitions - Bump dependencies
- Updated
snoowrap#applicationOnlyAuth
TypeScript definitions - Fixed TypeScript definitions for TypeScript v3.7.0
- Fixed incorrect check for deviceId in
snoowrap#applicationOnlyAuth
- Fix incorrect docs for DO_NOT_TRACK_THIS_DEVICE param in
snoowrap#applicationOnlyAuth
- Added application only auth
snoowrap#applicationOnlyAuth
- Fixed ModmailConversation TypeScript definitions
- Converted ModmailConversationAuthor to TypeScript
- Added TypeScript definitions
- Added
Subreddit#getNewModmailConversations
- Added
snoowrap#getContentByIds
- Added support for locking and unlocking comments
- Deprecated
MultiReddit#rename
(this endpoint is no longer supported by reddit.com)
- Added support for new modmail
- Added
/best
endpoint
- Fixed an error when deleting images from subreddit stylesheets
- Fixed an issue where snoowrap would fail to change the visibility of a subreddit
- Re-release after accidentally publishing a broken package to npm
- Added
snoowrap#submitCrosspost
,Submission#submitCrosspost
, andSubreddit#submitCrosspost
- Added an exponential backoff for failed requests
- Fixed an issue where
Submission#getDuplicates
would return a 404 error - Fixed an issue where using an invalid auth code in
snoowrap.fromAuthCode
would result in a confusing error message
- Added support for
allow_images
andshow_media_preview
subreddit settings
- Added support for marking and unmarking posts as spoilers
- Fixed an issue where comments on some listings did not have a
replies
property - Fixed an issue where using invalid credentials could result in a confusing error message from snoowrap
- Added
snoowrap#getRising
andsubreddit#getRising
to get a list of "rising" posts on reddit - Fixed an issue where Webpack would throw "missing dependency" errors when including snoowrap
- Fixed an issue where
Listing#fetchMore
returned incorrect results when fetching very large Listings with theappend
option
- Fixed an issue where snoowrap threw an error when fetching PrivateMessages with no replies.
- Fixed an issue where ratelimit errors caused a confusing error message.
- Fixed an issue where Promises returned by
snoowrap#checkCaptchaRequirement
sometimes fulfilled with something other than a boolean.
- Fixed a regression where
snoowrap#oauthRequest
only accepted auri
option and did not accept aurl
option.
- Added
snoowrap#getStickiedLivethread
, which gets the globally-stickied live-thread if one exists. - Added
snoowrap#rawRequest
, which exposes raw request functionality. This is useful for snoowrap subclasses that want to use custom request logic.
- Added
snoowrap.getAuthUrl
andsnoowrap.fromAuthCode
functions, to allow for easier authorization of arbitrary accounts in browsers.
- Added
PrivateMessage#deleteFromInbox
, which deletes a private message from the user's inbox.
- Fixed an issue where
snoowrap#credentialedClientRequest
didn't acceptthis
-bindings with snake_case key names.
- All of snoowrap's methods and parameters are now in camelCase, to be more aligned with idiomatic JS. This is not a breaking change; for backwards compatibility, snake_case aliases are provided for all methods and parameters. Existing code should still work and does not need to be migrated.
- Added a
snoowrap.noConflict
method to avoid relying on global state in browsers
- Fixed an issue where Listings sometimes threw errors in Safari
- Added a
proxies
config option to explicitly disable method chaining even if the runtime environment supports theProxy
object
- Fixed an issue where
credentialed_client_request
could not be used in browsers without creating a snoowrap instance
- Fixed an issue where snoowrap's package.json file would cause errors when bundling with webpack
- Reduced the size of the browser bundle by 77%
- Fixed an issue where snoowrap did not work on iOS Safari
- Fixed an issue where an error could get thrown while fetching comment Listings in newer browsers
- Changed the name of the prebuild browser files to include the snoowrap version, e.g.
snoowrap-v1.6.0.min.js
. Please use these files rather than the defaultsnoowrap.min.js
file from now on.
- Added a
Subreddit#get_modmail
function to get modmail for a specific subreddit - snoowrap now requests gzipped content for all requests, which should reduce the amount of bandwidth it uses (#35).
- Fixed an issue where
RedditUser#get_saved
would return hidden content instead of saved content (#36)
- Fixed an issue where configurations were shared between snoowrap instances instead of being independent
- Fixed an issue where non-idempotent API requests would be retried after 503 errors, which would occasionally lead to duplicate results. To fix this, only idempotent requests (
GET
,PUT
, andDELETE
) are retried.
- Fixed an issue where
Subreddit#edit_settings
sometimes threw errors
- Added an
append
option to theListing#fetch_more
functions indicating whether fetched items should be returned with the existing Listing elements, or returned separately. - Fixed an issue where snoowrap wasn't working on OSX Safari
- Added support for username/password authentication by passing
username
andpassword
into the snoowrap constructor
- Added camelCase aliases for all exposed snoowrap functions
- Added support for passing comment IDs to
snoowrap#mark_messages_as_read
andsnoowrap#mark_messages_as_unread
- Added filtering options for
snoowrap#get_inbox
- Fixed an issue where a setting a high
request_delay
would delay script termination - Fixed an issue where
LiveThread#revoke_contributor_invite
would throw errors if Proxies were disabled - Fixed an issue where
Subreddit#set_multiple_user_flairs
could incorrectly report success if an error occurred - Fixed an issue where
Subreddit#set_multiple_user_flairs
would fail if a flair text contained special characters
- Added
snoowrap#mark_messages_as_read
andsnoowrap#mark_messages_as_unread
functions for dealing with multiple private messages simultaneously - Fixed an issue where
snoowrap#credentialed_client_request
would incorrectly fail when given certainthis
-bindings
- Added a
request_timeout
config option
If you're upgrading from v0.11.x, note the two small breaking changes introduced in v1.0.0-rc.1
.
- Fixed an issue where snoowrap would crash if it received a 401 error from the reddit API
- Fixed an issue where 5xx errors from the reddit API were parsed incorrectly
- Fixed an issue where some methods on
snoowrap.prototype
were enumerable
- [breaking]: Removed the
suppress_warnings
config option in favor of a newwarnings
option. - [breaking]:
Subreddit#get_user_flair_list
now returns a Promise for a Listing instead of a plain Array, which can be extended as usual. Theuser
property of each item in this Listing is now a RedditUser object rather than a string. - Added more lenient input parsing for
snoowrap#get_user
,snoowrap#get_subreddit
, etc. - Fixed issues where
snoowrap#search_subreddit_names
,Subreddit#get_settings
, andSubreddit#get_submit_text
would fail if Proxies were disabled - Fixed an issue where requests immediately following a ratelimit warning at the end of a ratelimit period would not be throttled correctly
- Fixed an issue where
Listing#fetch_all()
would consume more requests than necessary - Fixed an issue where an unsuccessful image upload could incorrectly report success
- Fixed an issue where the
restrict_sr
option onsnoowrap#search
was always set totrue
- Exposed
oauth_request
,credentialed_client_request
,unauthenticated_request
, andupdate_access_token
functions for sending raw requests to servers - Fixed an issue where a TypeError would be thrown if the ratelimit was exceeded and
r.config().continue_after_ratelimit_error
was set totrue
(#19) - Fixed an issue where Submissions fetched from the front page were missing a
.comments
property
- Fixed an issue where
Listing#fetch_all()
would sometimes return an incomplete Listing when fetching Comment replies - Fixed an issue where the snoowrap constructor was not allowing the
client_secret
parameter to be an empty string - Fixed an issue where RedditContent objects were being converted to JSON incorrectly
- Fixed an issue where small comment reply chains were never considered 'finished'
- Fixed an issue where Submissions and Comments with a large number of top-level replies could end up with internally-used 'MoreComments' objects in the replies Listing.
This update contains a few new features and bugfixes.
- Added a
VoteableContent#expand_replies
function, which makes it easier to fetch and enumerate large comment trees - Added support for fetching deep comment chains in which a "Continue this thread" link appears on the main site
- Improved the documentation pages:
- Almost all functions now have usage examples
- A
snoowrap
global is exposed for use in the dev console
- Improved the validation for
snoowrap#config
parameters - Added the ability to block the author of any
ReplyableContent
object - Fixed an issue where unsubscribing from a Subreddit would return a 404 error if the user wasn't subscribed in the first place
- Fixed an issue where
Submission#get_link_flair_templates
would throw errors if Proxies were disabled - Fixed an issue where
LiveThread#get_contributors
would have an inconsistent structure if there were any pending contributor invitations - Fixed an issue where
Subreddit#assign_flair
was not returning a chained Promise
- Fixed an issue where certain Subreddit functions would throw errors if Proxies were disabled
This update contains a small number of breaking changes.
- [breaking] Listings are now immutable. This avoids race conditions that could previously occur while expanding Listings.
Listing.prototype.fetch_more
now returns a new Listing containing all fetched items, instead of mutating the original Listing. - [breaking] PrivateMessage replies are now arranged recursively into a tree structure.
- Added support for reverse Listing pagination if the
before
query parameter is set. - Added the
debug
config option, which logs API calls and ratelimit statistics. - Added a
skip_replies
option toListing.prototype.fetch_more
, for faster comment fetching when comment replies are not needed. - Added support for Listings to have extended
limit
properties when being initially fetched. For example,r.get_hot({limit: 150})
will now return a Listing with 150 elements, rather than being capped at 100.
This changelog does not cover versions before v0.11.0.