Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 Implementation #8

Open
4 of 23 tasks
icedream opened this issue May 11, 2018 · 6 comments
Open
4 of 23 tasks

v2 Implementation #8

icedream opened this issue May 11, 2018 · 6 comments
Assignees
Milestone

Comments

@icedream
Copy link
Owner

icedream commented May 11, 2018

Daniel just announced via e-mail that he is going to release version 2 of the API in the night to June 1st. Right now it is already available in staging. Unfortunately the API is mostly undocumented, so things I find out will be documented here, and then hopefully implemented asap.

Deadline for this implementation is either late summer as that will be deadline for data updates on v1 (which by the way will stay available) or end of this year where the API will no longer be supported officially if I read this correctly.

v1 will be supported throughout the current year but however: it won't provide any of the new features and won't be updated with new seasons in late summer.

Below is the list of things that still need to be implemented:

  • Authorization using Basic-Auth for v2 staging
  • Endpoint /v2/areas - contains information about country codes seemingly
    • Parameter "areas": comma-separated list of area IDs
    • Endpoint /v2/areas/:id
  • Endpoint /v2/competitions - { count, filters, competitions: [ { id, area: { id, name }, name, code, currentSeason: { id, startDate, endDate, currentMatchday }, numberOfAvailableSeasons, lastUpdates }, ... ] }
    • Parameter "areas": comma-separated list of area IDs to filter by
    • Endpoint /v2/competitions/:id- competition meta { id, area: { id, name }, name, code, currentSeason: { id, startDate, endDate, currentMatchday }, seasons: [ { id, startDate, endDate, currentMatchday }, ... ], lastUpdated }
    • Endpoint /v2/competitions/:id/matches - matches list
    • Endpoint /v2/competitions/:id/teams - teams list
  • Endpoint /v2/teams/:id - team resource
  • Endpoint /v2/matches/... - match resource
    • /v2/matches - matches list

      filtered by dateTime to today by default

    • /v2/matches/:id - match information

Match object:

  • .(home|away)Team.coach - { id, name, countryOfBirth, nationality }
  • .(home|away)Team.lineup - Array of players in line-up
  • .(home|away)Team.bench - Array of players on bench
  • .bookings - punishments made by a player [ { minute, team { id, name }, player { id, name }, card } ]
  • .substitutions - player exchange during a match [ { minute, team { id, name }, playerOut { id, name }, playerIn { id, name } } ]
  • .goals: Array of goal information, who shot which goal when with assist of whom?
  • .stage: QUALIFICATION, PLAY_OFF, REGULAR_SEASON, LAST_16, QUARTER_FINAL, SEMI_FINAL, FINAL
  • .score.duration enum: null (same as REGULAR?), REGULAR, EXTRA_TIME
  • .score: fullTime = halfTime + extraTime
    • halfTime - Contains absolute score values at 45'.
    • fullTime - Contains end result of the game.
    • extraTime - Amount of goals that have been shot in the extra time. All values set to null unless game has been extended and any goals were shot.
    • penalties - Probably contains amount of penalty shots? All values set to null by default.
@icedream icedream self-assigned this May 11, 2018
@icedream icedream added this to the v0.2.0 milestone May 11, 2018
@icedream
Copy link
Owner Author

Will start working on it during the weekend.

@icedream
Copy link
Owner Author

icedream commented Jun 4, 2018

So far the areas endpoint has been implemented, however since I continued work on this late, we ran into the issue that during the transition out of staging on June 1st, we lost access to match and competition data and because of that are no longer able to test the endpoints properly. Since there is barely documentation for v2, this would be the only way to get a sense of how things work with it.

@MAGICCC already emailed Daniel from football-data about this.

@MAGICCC
Copy link
Collaborator

MAGICCC commented Jun 4, 2018

Got a mail back regarding getting access and yes it's working now. We can work on that later.

v2 API football.zip

@acche
Copy link

acche commented Aug 1, 2018

You mean while the V2(go-footballdata) released, v1 will deprecated?

@icedream
Copy link
Owner Author

icedream commented Aug 1, 2018

@acche Yes, I very likely have to push support for v1 and support for v2 into separate branches (v1 would be frozen at that point) as the data structures and endpoints are completely different.

@icedream
Copy link
Owner Author

I am unfortunately unable to put the time into getting this library up to date at the moment as I am putting efforts into other projects. If anyone wants to help me on this and/or wants to suggest ideas on how to update this to current situation, please do so, I would greatly appreciate it! Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants