Quinta-feira, 10 de Novembro de 2011

Real Sports on Codebits

Well, almost.


As you may know, there are a bunch of Euro 2012 (and Sub-21, and League) football - oh, sorry, soccer for those of you with a U.S. bent - games going on during Codebits, two of which feature Portuguese teams.


Since SAPO has a wealth of public APIs available as a matter of course and most people in the world are football (sorry, soccer) fans, we decided, for your continued enjoyment, to open a couple of special endpoints for those of you wanting to keep track of games in real time, as well as some (temporary) authentication credentials for you to use.


The service endpoint is at https://services.sapo.pt/Sport/FootballDEV (also available in plain HTTP in case you really need to, but you'll only have an excuse not to use HTTPS until tomorrow afternoon).


There's a wealth of information available there, and the available operations are (sorry for the long listing, but we're serious about our sports):


GetStadiums / GetCompetition / GetLeagueTables / GetOccurrences

GetMatches / GetRecentMatches / GetLiveMatchStatus / GetMatchStatistics / GetMatchOccurrences
GetTeams / GetSquad / GetLineups / GetPlayerRankings / GetPlayerStatistics


You'll be able to invoke these on the data for three competitions:


  • Euro Polónia/Ucrânia 2012 / CompetitionId = 568
  • Euro Sub-21 Israel 2013 / CompetitionId = 760
  • Primeira Liga 11/12 / CompetitionId = 155

There's a nice WSDL file available to make it easier for you to invoke these. You'll need to know the ESBCredentials, of course, but the example below (that shows you how to invoke GetMatches for the games tomorrow) has everything you need


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:def="http://services.sapo.pt/definitions" xmlns:foot="http://services.sapo.pt/Metadata/Sport/Football">

So lace up your sneakers and have a go at it. If you need help, the developers will be around tomorrow (just ping one of the SAPO volunteers to get them to pop over and lend a hand). 



The good thing is that there'll be plenty of SOAP to help you clean up afterwards :)

publicado por rcarmo às 22:44
link do post | comentar