Configuration
Through out the documentation, you will encounter the JSON configuration parameters for our library. This page explains the in details these configuration parameters.
The default configuration file name is libSportConfig.json
and it is a json file looking like following:
{
"username" : "unity_username",
"password" : "unity_password",
"uri" : "http://feed.url.com",
"scope" : "unity",
"bookFilter" : ["PS3838"],
"oddTypeFilter" : ["TODAY"],
"sportFilter" : ["SOCCER"],
"ttlConfig" : {
"enableTtl" : false,
"earlyttl" : 60000,
"todayttl" : 30000,
"livettl" : 5000
}
}
The explanation of the fields are as following:
Parameter | Required | Description | Type | Example | Default |
---|---|---|---|---|---|
username | yes |
Unity credentials given to you | String | unity_user | empty |
password | yes |
Unity credentials given to you | String | unity_password | empty |
uri | yes |
Connection URL to data feed given to you | String | http://feed.url.com | empty |
scope | optional | Scope that you want to discover streams from, default scope is unity. In normal working conditions, you should not set this value, and just use the default value. | String | unity | unity |
bookFilter | optional | Filter out the sportbooks that are not specified in this field, default is all sportbooks | String[ ] | [“IBC”,”SBO”] | null |
oddTypeFilter | optional | Filter out the odd types that are not specified in this field, default is all odd types | String[ ] | [“LIVE”,”TODAY”] | null |
sportFilter | optional | Filter out the sports that are not specified in this field, default is all sports | String[ ] | [“SOCCER”] | null |
enableTtl | optional | Enable time to live or not, default is enabled | boolean | true | true |
livettl | optional | Message time to live for odd type LIVE, default is 5 seconds | int | 5000 | 5000 |
todayttl | optional | Message time to live for odd type PENDING, default is 15 seconds | int | 15000 | 15000 |
earlyttl | optional | Message time to live for odd type EARLY, default is 30 seconds | int | 30000 | 30000 |