getNextUkHorseRacingMarket throwing up error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RicHep365
    Junior Member
    • Apr 2012
    • 5

    #1

    getNextUkHorseRacingMarket throwing up error

    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"}


    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;

    Help gratefully appreciated
  • RicHep365
    Junior Member
    • Apr 2012
    • 5

    #2
    Ok, solved it.

    Was a missing "/" after listMarketCatalogue...Doh...!!

    $jsonResponse = sportsApingRequest($appKey, $sessionToken, 'listMarketCatalogue/', $params);

    Comment

    Working...
    X