Add new limit option to limit the requested amount of posts from the Reddit API (#203)
All checks were successful
Test / build (push) Successful in 8s

- Add the limit option
- Valid number between 1 and 100
- Defaults to 100
- Updated documentation to mention this

#137

Reviewed-on: #203
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
Ethan Lane 2024-07-26 18:23:19 +01:00 committed by Vylpes
parent 6f0109ae6e
commit 2b3e65302b
12 changed files with 170 additions and 17 deletions

View file

@ -25,5 +25,6 @@ Title = This is my Ms Bear!
Upvotes = 17
Url = https://preview.redd.it/d5yno653zf7d1.jpg?width=640&crop=smart&auto=webp&s=5064d1caec3c12ac2855eb57ff131d0b313d5e9d
Query.Subreddit = rabbits
Query.Sort By = hot"
Query.Sort By = hot
Query.Limit = 100"
`;

View file

@ -10,6 +10,7 @@ describe("GenerateOutput", () => {
Query: {
subreddit: "rabbits",
sortBy: "hot",
limit: 100,
},
Result: {
Archived: false,
@ -40,6 +41,7 @@ describe("GenerateOutput", () => {
Query: {
subreddit: "rabbits",
sortBy: "hot",
limit: 100,
},
Result: {
Archived: false,
@ -72,6 +74,7 @@ describe("GenerateOutput", () => {
Query: {
subreddit: "rabbits",
sortBy: "hot",
limit: 100,
},
Result: {
Archived: false,