Commit Graph

10 Commits

Author SHA1 Message Date
chris48s
692829f91c migrate examples to openApi part 6; affects [opencollective opm ossf powershell pub pypi reddit repology] (#9462)
* migrate some services from examples to openApi

* improve and de-dupe service titles
2023-08-19 04:33:27 +00:00
chris48s
f24b00fecd increase max age on reddit badges (#9282)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-06-18 11:50:19 +00:00
chris48s
14892e3943 Implement a pattern for dealing with upstream APIs which are slow on the first hit; affects [endpoint] (#9233)
* 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
2023-06-13 21:08:43 +01:00
Pierre-Yves B
23c0406bed Migrate from CommonJS to ESM (#6651) 2021-07-09 12:53:55 +01:00
Thakur Karthik
2fa69ba359 Refactor readthedocs reddit redmine repology services (#5641)
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-10-03 15:10:16 +00:00
chris48s
504015c0ba migrate hapi/joi to joi (#5624)
* update joi + joi-extension-semver

* @hapi/joi --> joi

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2020-09-30 17:51:02 +00:00
Joe Izzard
36e1d30631 [Reddit] New badge and additional testing (#5166)
* 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>
2020-06-09 02:15:07 +00:00
dependabot-preview[bot]
294aa1e1df Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0; autofixes (#3671)
* Build(deps-dev): bump eslint-plugin-import from 2.17.3 to 2.18.0

Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.17.3 to 2.18.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.17.3...v2.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Autofixes
2019-07-08 12:13:46 -04:00
chris48s
8621fe42d7 Upgrade Joi (#3505)
* upgrade joi
* find & replace ALL THE THINGS
* update related deps
2019-06-02 21:59:55 +01:00
Josep Bernad
d685cde52b Add [Subreddit] subscribers (#3443)
* 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>
2019-05-22 16:43:13 -05:00