add [twitch] user status badge (#3683)

* add /twitch/status/:user badge

* update comments

* use a proper schema for the Twitch API calls

* use a token to make Twitch api calls

* fix handling of rate-limit error and bad token error

* [twitch] get a token as soon as creating a Twitch service

* [twitch] start both requests to users and stream before awaiting

* [twitch] set a timeout to replace the token before it expires

* [twitch] use authHelper

* [twitch] skip tests when no credentials

* [twitch] add one more status test

* twitch: do not check whether a user exists
This commit is contained in:
Andy Li
2019-09-10 05:41:32 +08:00
committed by Caleb Cartwright
parent 5d005e40e6
commit 4b9053d2d5
5 changed files with 243 additions and 0 deletions

View File

@@ -105,6 +105,8 @@ const privateConfigSchema = Joi.object({
sl_insight_userUuid: Joi.string(),
sl_insight_apiToken: Joi.string(),
sonarqube_token: Joi.string(),
twitch_client_id: Joi.string(),
twitch_client_secret: Joi.string(),
wheelmap_token: Joi.string(),
}).required()