1.27 - 6/17/2018

  • Added alias function get_modqueue, which is an alias for get_modlinks.
  • Added new class propery print_request_on_error. If this is true, Reddit::Client will print the entire response and request when there is an error. (This is the same information you would get with print_request, but only printed on error.)
  • Reduced automotic token refresh time even further, to 58 minutes, then reset it to 59 minutes 10 seconds after testing that appears to show that the cause of the 401s is not our tokens at all, but Reddit failing under heavy load. These appear to be errors that would normally be 503s, but are failing in a different way on Reddit's end for some reason, and failing as a 401 instead. So while nothing has changed on that front in 1.27, hopefully who are gettings 401s might find this information useful.

1.26 - 6/10/2018

  • Added function submit_crosspost to main methods.
  • 'subreddit' is now required in submit_link
  • Variable print_response has been renamed print_response_content, but the former will still work.
  • Dropped automatic token refresh time to 3550 (1 hour, minus 50 seconds). This is to try to catch overlap in scripts that run for longer than an hour.
  • 'username' can now optionally be passed in when initializing a new web-type Reddit::Client object. Since username is not required for web-type authentication, it wasn't set by default like it used to be with script-type apps. Functions that require it (for example fetching your own multis) would fail unless it was passed in manually with the function call. This allows you to pass it in at the beginning

1.244 - 5/9/2018

  • 1.243: Reverted change making the request_errors flag default to true. It now defaults to false again. It now has the more sensible alias print_request_errors, which is how the documentation will refer to it from now on.
  • 1.244: Fixed bug introduced while doing that.

1.241 - 4/29/2018

  • Reddit::Client now prints the content of request errors by default, instead of just the status code. (Previously it would print just the status code unless request_errors was true. You can still set request_errors to false if you choose.)
  • Added function ban to main methods.

1.23 - 4/16/2018

  • Added function get_refresh_token. This is a big one for people using Web-type apps. It allows you to use Reddit::Client to get a permanent refresh token. Previously one had to write a script to do this themselves.
  • Added function get_modmail_raw to main methods. This retrieves new modmail from Reddit in its raw form, which is a mess. get_modmail is planned as a function that will return it in a more usable form.
  • Removed some unused fields from Link and Comment.
  • Clarified the meanings of some lesser-known debug variables: print_request now prints the entire request and response, always. print_reponse now prints the content of Reddit's response, always. request_errors prints the content of the response, if there is an error (unchanged).

1.21 - ?

  • Added function spam to main methods.
  • Link and Comment also have their own spam methods.

1.20 - 3/5/2018

"Web" type apps are now supported! This means that you can now write apps to be used by the public at large, not just "script" type apps, which require a username and password and are intended for personal use only.

Users can authorize a "web" type app to take actions on their behalf. This process will be familiar to you if you've ever used a non-official Android or iPhone app to interact with Reddit. The user is presented with a confirmation screen (from Reddit itself-- they give their password to Reddit, not you) where they can then click "accept" to give the app persmission to take actions on their behalf, for example make posts or read their inbox messages.

To use "web" type authentication, pass in the key refresh_token, which you have obtained by following Reddit's oauth setup guide: https://github.com/reddit-archive/reddit/wiki/OAuth2. There are plans to add a guide for that in the future, since it's slightly involved, but for now you're on your own.

Other changes this update:

  • Added functions get_wiki and get_wiki_data in main methods.
  • edit_wiki now accepts the alias 'sub' for parameter 'subreddit'.
  • user_agent is now required when instantiating a new Reddit::Client object.

1.10 - 2/25/2018

1.0991 - 2/23/2018

  • Fixed a bug that had been introduced in the last version

1.099 - 02/10/2018

  • get_user can now accept the 'about' view, which will return an Account object of the user's account.
  • Added 'about' user constant
  • Added "delete" method to the Link class, which documentation already lyingly said was there
  • Internal: updated get_user and list_subreddits to use set_listing_defaults

1.098 - 11/27/2017

  • Added moderation function remove in main methods.
  • Link and Comment objects have their own remove method too.
  • submit_link. submit_text and get_subreddit_comments can now accept the subreddit as sub as well as subreddit.

1.0972 - 11/02/2017

  • Added function edit in main methods.
  • Comments and Links now also have their own edit methods, which are the same but doesn't require a fullname as the first argument.
  • get_comment and get_link can now accept a short id as well as a fullname.
  • Comments and Links now have their own delete functions.
  • Fixed get_permalink in Comment, which was returning the wrong result if its parent was a comment rather than a post.
  • Added function get_permalink to Link.

1.0965 - 10/28/2017

get_modlinks has been updated to support all 5 categories of mod links, not just 'modqueue'.

1.096 - 10/27/2017

  • Added function get_modlinks.
  • Link and User classes now have properties user_reports and mod_reports. They are both array references; the difference is that mod_reports contains the name of the moderator who reported it. (Only if they are a moderator of the sub it's being reported in.) Despite being array references, they are formatted like an array of hashes. For example,

    [["First report", 1], ["Second report", 1]]

    The number is the number of times that report has appeared.

  • Account, Message, and SubReddit classes now have a type property like Links and Comments do. It corresponds to the types of things.

  • Functions that return listings are now more consistent, and all now recognize all of the listing variables, such as count, sr_detail, and only.
  • The Account class now has many more properties, nearly all that are returned by Reddit.

1.094 - 9/12/2017

  • Fixed a bug that would prevent passwords with special characters from authenticating (thanks jay.wilmarth@gmail.com).
  • Added function get_subreddit_info.

1.093 - 8/20/2017

  • Reverted a change from 1.0901 that would display the full content of request errors. Sometimes Reddit returns a full web page instead of just the JSON error data (usually on 503-type heavy traffic errors), which could cause problems for scripts not expecting it.
  • Full request errors can now be displayed by setting request_errors to true when creating a new Reddit::Client object.
  • Accidentally skipped two minor version numbers. This should have been 1.091. Woops.

1.0902 - 8/19/2017

  • Fixed a bug that would cause an warning message when using get_subreddit_comments
  • Removed the view argument from get_subreddit_comments as it did nothing.

1.0901 - 8/9/2017

  • Fixed a bug that would cause an error message if Reddit's response was empty on a successful request.
  • Reddit::Client can now handle PUT and DELETE requests, which was required for the new functions.
  • Request errors now include the body of Reddit's response. This is usually a small glob of JSON.
  • Added the create_multi, delete_multi, edit_multi and get_multi functions.

1.086 - 7/3/2017

Added the repost parameter to submit_link.

1.085 - 7/2/2017

Fixed bug in submit_text and submit_link functions that was causing the inbox_replies flag to be ignored if false.

1.084 - 1/22/2017

Added the comment function.

1.083 - 1/21/2017

Added the edit_wiki function.

1.082 - September 2016

Added a patch for Perl 5.22, which would cause warning messages when using the info() function.

1.081

Added get_flair_options, set_post_flair and set_user_flair to the main methods.

1.080

Added subreddit_type and public_traffic to SubReddit.

1.079

Fixed bug that caused Comment->reply() to reply to the parent instead of the comment.

1.078

token_request was incorrectly passing the user agent string to LWP, which was causing an error with new versions of LWP.

1.076

The get_permalink method of Comment no longer makes a request, making it safe to use as much as you'd like.

The main Reddit::Client class's get_permalink method still makes a request, although now it can take either an ID or fullname for the comment and post.

1.075

  • added get_user function
  • Links and Comments now have a type property, a constant which is "t3" or "t1" repsectively.

1.073

  • find_subreddits now returns a list instead of a hash, bringing it in line with all other functions that returns lists of things.
  • find_subreddits now accepts a hash that can contain the usual list control variables: before, after and limit, along with a sort type that's unique to itself