Only Thoroughbreds Races of Australia

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Exchange_API
    Junior Member
    • Dec 2015
    • 10

    #1

    Only Thoroughbreds Races of Australia

    If I use (https://api-au.betfair.com/exchange/betting/json-rpc/v1) API to get Australian Horse Races.I am getting (Thoroughbreds + Harness) races.How can I achieve only Thoroughbreds races of Australia ?
  • Grantay.
    Junior Member
    • Jan 2010
    • 53

    #2
    Test for thouroughbreds only

    This is how I do it:
    Code:
      For Each item In marketList
    
                    If (eventTypeSel.Equals("All")) Then
                        finalmarketList.Add(item)
                    ElseIf (eventTypeSel.Equals("Horse")) Then
                        If (item.EventType.Id.Equals("7")) Then
                            finalmarketList.Add(item)
                        End If
                    ElseIf (eventTypeSel.Equals("Greyhounds")) Then
                        If (item.EventType.Id.Equals("4339")) Then
                            finalmarketList.Add(item)
                        End If
                    ElseIf (eventTypeSel.Equals("Harness")) Then
                        If (item.EventType.Id.Equals("7")) Then
                            ' Continue For
                            'Else
                            'If InStr(item.MarketName, "Pace") Then
                            '    finalmarketList.Add(item)
                            'ElseIf InStr(item.MarketName, "Trot") Then
                            '    finalmarketList.Add(item)
                            If (item.MarketName.Contains("Pace") Or item.MarketName.Contains("Trot")) Then
                                finalmarketList.Add(item)
                            Else
                                Continue For
                            End If
                        End If
                        End If
                Next
    So in event type 7 - horses - you check for Pace or Trot in the market name and omit them

    Grantay

    Comment

    Working...
    X