SoMuchForSubtlety / f1viewer

🏎️ TUI for F1TV
GNU General Public License v3.0
755 stars 66 forks source link

APIs for F1Viewer #49

Closed WalrusPUNCH closed 4 years ago

WalrusPUNCH commented 4 years ago

What APIs are you using for this project? Where it's possible to read their documentations?

balexandre commented 4 years ago

do you mean this?

https://github.com/SoMuchForSubtlety/f1viewer/blob/master/api.go#L13

LsHallo commented 4 years ago

As far as I can tell it also relies heavily on https://github.com/SoMuchForSubtlety/golark Which is an api for skylark (https://www.skylarkcms.com/) which F1TV seems to be using

SoMuchForSubtlety commented 4 years ago

The previous commenters are correct

I'm using the API the official web app uses too. The API is not documented, I found the endpoints by watching the calls being made.

There is a newer endpoint now that the web app uses, but the old one still works.

old endpoint: https://f1tv.formula1.com/api/ new endpoint: https://f1tv-api.formula1.com/agl/1.0/unk/en/all_devices/

I use this library to make the calls https://github.com/SoMuchForSubtlety/golark

SoMuchForSubtlety commented 4 years ago

You can try it out like this https://play.golang.org/p/Si_AOXa3eqz