Jump to content

Key for matching teams (and games) . API soccer


koyan

Featured Comment

Posted

So, I have made my bot using the non-documented API, and I am looking into ways to improve it. 

I have my own pre-existing database with a list of games, and I am trying to match each upcoming game in my database with the equivelant game in stake. 

My current methodology (which I am feeling could be improved greatly) is the following: 

a) For each league, store in my database the stake category and league name (for example: "usa" and "major-league-soccer")

b) For each team store in my database the name that stake uses (for example: "New York City FC" and "New England Revolution")

c) When I have a new game I want to match, fetch all the games that stake currently lists for that league

d) Check against the key data.competitors.name  and try to match a game using the names of the competitors

e) If matched, retrieve the slug. 

 

Questions: 

a) Do you have a better way to match games? 

b) Have you experienced the names of the teams changing (for example between national and international leagues)

c) Do you know of any way to retreive games of a specific team? 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Privacy Policy Terms of Use