Announcement

Collapse
No announcement yet.

Wrond events being listed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wrond events being listed

    I am making the following request but the results that I get include Greyhounds. I am using the delimiter "7" which should be just Horse Racing. Anyone know why and how to fix it? Thanks


    [
    {
    "jsonrpc": "2.0",
    "method": "SportsAPING/v1.0/listMarketCatalogue",
    "params": {
    "filter": {
    "EventTypeIds": [
    "7"
    ],
    "marketCountries": [
    "GB"
    ],
    "marketTypeCodes": [
    "WIN"
    ],
    "marketStartTime": {
    "from": "2016-12-10T13:15Z",
    "to": "2016-12-10T23:00:00Z"
    }
    },
    "sort": "FIRST_TO_START",
    "maxResults": "200",
    "marketProjection": [
    "MARKET_START_TIME",
    "RUNNER_DESCRIPTION",
    "EVENT"
    ]
    },
    "id": 1
    }
    ]

  • #2
    Yep, I can confirm that.

    {"jsonrpc":"2.0","result":[{"event":{"id":"28046410","name":"Ling 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Lingfield","openDate":"2016-12-10T11:55:00.000Z"},"marketCount":1},{"event":{"id" :"28046569","name":"Monm 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Monmore","openDate":"2016-12-10T18:33:00.000Z"},"marketCount":11},{"event":{"id ":"28047471","name":"Towc 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Towcester","openDate":"2016-12-10T19:15:00.000Z"},"marketCount":14},{"event":{"id ":"28046479","name":"Donc 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Doncaster","openDate":"2016-12-10T11:50:00.000Z"},"marketCount":1},{"event":{"id" :"28046925","name":"Crayfd 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Crayford","openDate":"2016-12-10T19:31:00.000Z"},"marketCount":12},{"event":{"id ":"28046956","name":"Newc 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Newcastle","openDate":"2016-12-10T19:39:00.000Z"},"marketCount":12},{"event":{"id ":"28046753","name":"Hove 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Hove","openDate":"2016-12-10T19:31:00.000Z"},"marketCount":12},{"event":{"id ":"28047008","name":"Romf 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Romford","openDate":"2016-12-10T19:30:00.000Z"},"marketCount":13},{"event":{"id ":"28046567","name":"Central Park 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Central Park","openDate":"2016-12-10T18:28:00.000Z"},"marketCount":12},{"event":{"id ":"28046310","name":"Newc 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Newcastle","openDate":"2016-12-10T12:15:00.000Z"},"marketCount":3},{"event":{"id" :"28046554","name":"Poole 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Poole","openDate":"2016-12-10T15:08:00.000Z"},"marketCount":7},{"event":{"id" :"28046553","name":"Newc 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Newcastle","openDate":"2016-12-10T14:24:00.000Z"},"marketCount":11},{"event":{"id ":"28046750","name":"Wdon 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Wimbledon","openDate":"2016-12-10T20:00:00.000Z"},"marketCount":7},{"event":{"id" :"28044894","name":"Chelt 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Cheltenham","openDate":"2016-12-10T12:05:00.000Z"},"marketCount":1},{"event":{"id" :"28046579","name":"Sund 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Sunderland","openDate":"2016-12-10T18:39:00.000Z"},"marketCount":11},{"event":{"id ":"28046480","name":"Wolv 10th Dec","countryCode":"GB","timezone":"Europe/London","venue":"Wolverhampton","openDate":"2016-12-10T17:15:00.000Z"},"marketCount":8}]}

    Comment


    • #3
      No idea what's wrong, I'm afraid.

      On another minor point, you might consider
      "to": "2016-12-10T23:59:59Z"
      if you ever look at something other than GB horses.

      Comment


      • #4
        Well thanks for running my code and confirming that I'm not actually losing the plot, and yes I've got to do some tidying on the time etc., but if I can't solve the immediate problem I'm not going to move forward at all.

        Comment


        • #5
          Not the ideal solution, but there are only about 58 GB racecourses. I don't know if any do both horses and greyhounds, but any chance you could store the horse courses (maybe in a file) and ignore anything returned for a wrong venue?

          Comment


          • #6
            Change EventTypeIds to eventTypeIds in your JSON (i.e. lowercase 'e')

            Comment


            • #7
              Doh!

              Comment


              • #8
                Solved

                Wow, well spotted. That has solved it for me. Thank you very much for taking the time to look at it. Very much appreciated.

                Comment

                Working...
                X