#!/usr/bin/env python import myAPILib sessionToken = myAPILib.loginAPING("youruserid","yourpassword") print (sessionToken) if sessionToken != -1: appKey = 'yourappkey' eventTypesResult = myAPILib.getEventTypes (appKey, sessionToken) horseRacingEventTypeID = myAPILib.getEventTypeIDForEventTypeName(eventTypesResult, 'Horse Racing') print ('The number for horse racing is ' + horseRacingEventTypeID) if horseRacingEventTypeID == -1: print (error) # take some evasive action, perhaps try again else: races = myAPILib.getEvents(appKey, sessionToken, horseRacingEventTypeID) if races != -1: for race in races: print (race['marketId']) race['marketStartTime'] = myAPILib.checkSummerTime(race['marketStartTime']) print (race['marketStartTime']) allRunners = race['runners'] for selection in allRunners: print (selection['runnerName'] + " " + str(selection['selectionId'])) print () print () print ()