KnutZuidema / golio

League of Legends, Legends of Runeterra and Valorant API client library for Go
MIT License
72 stars 29 forks source link

Adding TFT API support #69

Open happsie opened 3 months ago

happsie commented 3 months ago

Added support for the following TFT APIs:

  1. SPECTATOR-TFT-V5
  2. TFT-LEAGUE-V1
  3. TFT-MATCH-V1
  4. TFT-STATUS-V1
  5. TFT-SUMMONER-V1

Had to make a minor change to the client.go adding request options. This is because the SUMMONER-V1 has en endpoint that requires setting an authorization header. So, instead of breaking all methods, I thought adding a functional options pattern was better. This would also allow for other extensions of the request in the future.

Adding this as a draft since this is not related to an active issue and is rather big. I will continue the godoc of the models.go

Also found out that the API is a bit out of sync for what it seems. Running live API-calls would sometime give other properties than specified in the API. I have added some of the missing fields and removed some to try match the API as close as possibly without making it hard to understand.

happsie commented 2 months ago

@KnutZuidema feel free to have a look when you have time. Not sure if you got notification about this

happsie commented 1 month ago

Any updates on this @KnutZuidema ? 😄