[This service is no longer active. I plan to re-activate it sometime in the future.]
Woohoo! My first webservice works. In fact, my first use of Radio Userland as a development platform! You should see the results of my XML-RPC call below. It was generated by the following macro: <%["xmlrpc://no-longer-active/RPC2"].currentMeetingsHTML()%>
This returns an HTML table containing the current race meetings being handled by the New Zealand TAB. The TAB has to be operating (it runs on New Zealand time) and the data changes after about 10:15am (again NZ time) each day.
The above XML-RPC call does its magic by calling two other XML-RPC methods. The first is: <%["xmlrpc://no-longer-active/RPC2"].master.currentChild()%>
This returns a number identifying the current days racing. You use this number to pass to the next rpc call: <%["xmlrpc://no-longer-active/RPC2"].raceday.meetings(raceday)%>
Where 'raceday' is the number returned from master.currentChild. The meetings call returns an array of structures containing the following members:
code
- The meeting code which identifies the location of the races.
- title
- The title of the meeting.
- jetbet
- The internal TAB identifier used to place bets on the races in that meeting.
- races
- The number of races within that meeting.
The next step is to provide additional functionality allowing enumerating the races, the runners, historical information, etc. My goal is to see how much of my Odds Viewer functionality I can 'web-ify' using Radio.
2:39:00 AM
|