* allow serviceData to override cacheSeconds with a longer value
* prevent [endpoint] json cacheSeconds property exceeding service default
* allow ShieldsRuntimeError to specify a cacheSeconds property
By default error responses use the cacheLength of
the service class throwing the error.
This allows error to tell the handling layer the maxAge
that should be set on the error badge response.
* add customExceptions param
This
1. allows us to specify custom properties to pass to the exception
constructor if we throw any of the standard got errors
e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
to set the response maxAge
* customExceptions --> systemErrors
* errorMessages --> httpErrors
* fix: added detection of private subs and aded a test
* test: added test for no subscriber info
* feat: added user-karma badge
* refactor: changed class name for testing
Changed the class name to allow testing the whole service with 'reddit'
* refactor: refactored code for code and output style
* refactor: change how variables are passed to be cleaner
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* Add subreddit subscribers service file.
* Fix small detail in service and add the tests files.
* Apply suggested changes by the reviewer.
* Trying to make tests work.
* Update services/reddit/subreddit-subscribers.tester.js
Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
* Update services/reddit/subreddit-subscribers.tester.js
Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>
* Apply suggested changes.
* Add different handler for non existing and invalid subreddits.
* Update services/reddit/subreddit-subscribers.service.js
Co-Authored-By: Caleb Cartwright <calebcartwright@users.noreply.github.com>