API that powers the Twitched Roku app.
GPLv2. See license.txt
This web applet is powered by the Gradle build system and designed to run on Heroku.
IDE: The project must be built with gradle first for the constants class to be generated and available to the IDE.
./gradlew jar
The output will be at: ./server/build/libs/server-*.jar
and ./status/build/libs/status-*.jar
.
Most of the parameters are passed via environment variables.
Random string that serves as a way for a client to identify itself
Multiple client ids can be defined by delimiting ids with a comma ,
.
Heroku specific variable that defines what task should be used to build with Gradle
This should be set to "jar".
Redis server URL
This should be in the following format:
redis://<username>:<password>@<server>:<port>
Optional
Changes the environment variable name to use instead of REDIS_URL.
For example, if set to EXT_REDIS_URL, the Redis URL will be pulled from EXT_REDIS_URL instead of the default REDIS_URL.
Amount of redis connections allowed
The Twitch client ID that will be used to make request to the Twitch API
Optional
Client secret used to obtain an app token from the Twitch API
If no client secret is provided requests will not have an app access token and will be limited.
Values: TRUE | FALSE
If this is set to TRUE, the ALLOWED_CLIENT_ID will be ignored and all requests will be allowed.
Global salt to use when hashing sensitive data
Values: TRUE | FALSE
Enabled dev api endpoints
Optional
If specified, this URL will be used in Oauth request to Twitch that require a redirect url. The URL will be crafted based the domain name and scheme used to access the site.
Optional
Specify a list of ad servers that will be used when the ad server endpoint is called. The string should be a valid JSON object with the field ad_servers containing an array populated with one object per server. Each server object shoudl contain a url string field and a countries array. Country strings are expected to be in ISO 3166-1 Alpha 2 format. The country code "INT" is a special case that signifies that the server can be used internationally.
{
"ad_servers" : [
{
"url": "http://vast_ad_server.example.com?tag=0001",
"countries": [
"INT",
"US"
]
}
]
}
Optional
Values: TRUE | FALSE
Default: TRUE
If set to true, HTTP traffic will be redirected to HTTPS.
Optional
Values: TRUE | FALSE
Default: TRUE
If set to true, sql connections will required on the database connection.
Optional
Default: twitched
Main database scheme name.
Values: SEVERE WARNING INFO CONFIG FINE FINER FINEST
Set the log level
The allowed values are the same as java.util.logging levels.
JSON object with Twitched configuration settings for apps.
{
"force_remote_hls": false
}
Queue id to use. Only one consumer is expected.
Google JSON credentials
If set to TRUE, the Redis connection will be made over TLS
Literal \n
characters will be replaced with new lines.
Redis TLS server certificate
By default tests for the Roku BIF generator will attempt to download a
Twitch VOD to the temp directory. If the argument -DBIF_CLEAR_CACHE=true
is not passed to gradle, the VOD will not be re-downloaded if it present
Twitch VOD to the temp directory. If the env var BIF_CLEAR_CACHE
is not set to true, the VOD will not be re-downloaded if one is present
on disk, This is useful for running performance tests back-to-back.