I am just starting to use API-NG after successfully using API-6 for the past 2 years but I am struggling from the off to get anything working.
I have managed to get sessionToken and horseRacingEventTypeId but now I want to list out markets and runners.
I have tried the following from the sample code but get an error:
Call to api-ng failed:
Response: {"detail":{},"faultcode":"Client","faultstring":"D SC-0021"}
Help gratefully appreciated
I have managed to get sessionToken and horseRacingEventTypeId but now I want to list out markets and runners.
I have tried the following from the sample code but get an error:
Call to api-ng failed:
Response: {"detail":{},"faultcode":"Client","faultstring":"D SC-0021"}
PHP Code:
$nextHorseRacingMarket = getNextUkHorseRacingMarket($appKey, $sessionToken, $horseRacingEventTypeId);
function getNextUkHorseRacingMarket($appKey, $sessionToken, $horseRacingEventTypeId)
{
$params = '{"filter":{"eventTypeIds":["' . $horseRacingEventTypeId . '"],
"marketCountries":["GB"],
"marketTypeCodes":["WIN"],
"marketStartTime":{"from":"' . date('c') . '"}},
"sort":"FIRST_TO_START",
"maxResults":"1",
"marketProjection":["RUNNER_DESCRIPTION"]}';
$jsonResponse = sportsApingRequest($appKey, $sessionToken, 'listMarketCatalogue', $params);
return $jsonResponse;
}
Comment