Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds the "subreddit" parameter to Reddit.info(). (#1570)
This change adds the `subreddit` parameter as defined in the reddit API documentation (https://www.reddit.com/dev/api#GET_api_info). This change was implemented in the Reddit API earlier today, which makes it easier for developers to get many subreddits at once by their name, which can significantly reduce the amount of requests made by an API client. This change adds the parameter to info, updates relevant checks, and updates the test that test for IDs provided. Previously, if developers wanted to use this new parameter they would have to perform the request manually. In accordance with some contributing guidelines, this commit adds the two integration tests needed. The test uses one subreddit name that is normally formatted (/r/redditdev) and three others, which while are still valid subreddits, are different from the norm in some way (/r/nl's name is too short, /r/t:1337 is a timereddit which has a colon in its subreddit name, and /r/reddit.com which has a period in its name. Each subreddit exists and is publicly accessible, which should make tests that use these subreddit succeed for the forseeable future. If the visibility of any of the subreddits do change, the test may have to be changed to reflect this. (cherry picked from 0e57527d3f5ccc0279f6b0c21b310b1f607f8152)
- Loading branch information
1 parent
c636604
commit 922142d
Showing
6 changed files
with
146 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
tests/integration/cassettes/TestReddit.test_info_sr_names.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters