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

Move to VATSIM API v2 #808

Open
3 of 4 tasks
blt950 opened this issue Feb 16, 2024 · 5 comments
Open
3 of 4 tasks

Move to VATSIM API v2 #808

blt950 opened this issue Feb 16, 2024 · 5 comments
Labels

Comments

@blt950
Copy link
Member

blt950 commented Feb 16, 2024

VATSIM is no longer issuing v2 keys. Update our API calls to thew new API.

  •  Member list (Auth required with key) – fetchApiUsers() in UserController
  • Hour counting (No auth required) – UpdateAtcHours.php UserController and TrainingController (awaiting confirmed implementation of needed timespan argument from VATSIM Tech)
  • Hour counting in application process (No auth required) - TrainingController:https://api.vatsim.net/api/ratings/1751077/rating_times/ -> https://api.vatsim.net/v2/members/1751077/stats
  • TrainingController::apply() move over to https://api.vatsim.net/v2/members/
@blt950 blt950 added back-end enhancement New feature or request labels Feb 16, 2024
@bedrich-schindler
Copy link
Contributor

@blt950 Still waiting for VATSIM API key for v2. When obtained, I will jump onto it.

@blt950
Copy link
Member Author

blt950 commented Feb 19, 2024

Could be we need to support both v1 and v2 in a transition period to not block others of upgrading.

blt950 added a commit that referenced this issue Mar 6, 2024
Partially solves #808 by integrating VATSIM API Core v2 support.

Co-authored-by: Daniel <[email protected]>
blt950 added a commit that referenced this issue Mar 6, 2024
@blt950
Copy link
Member Author

blt950 commented Mar 6, 2024

Roster is in place and rating times.

What's left is the activity counter. In v1 we could restrict it to only return sessions from a given date to today, but now that's not possible - we can only limit amount in the reply. Waiting reply from VATSIM Tech if this will be implemented, otherwise we need to just ask for whole log and go through a long history and filter the dates as well ...

@bedrich-schindler
Copy link
Contributor

@blt950 Thanks! I just updated necessary parts to v2 (which require auth) and left the rest as I've found out same problem with the filters as you. Tech team seems busy, so it was on purpose. But thank you anyway. If you want me to finish the rest when API Core is ready, just let me know.

(First PR was a little wild from my side as I am not active PHP developer anymore and I am used to be controller by PHP PSRs, linters and static analyzers which have totally different setup than used in CC. I will do my best in future PRs :) )

@blt950
Copy link
Member Author

blt950 commented Mar 9, 2024

Thanks anyway. It's not that urgent, so I guess we'll just await this last change until they implement it. Until then the v1 API just for this call specifically works fine, and is better than doing a temporary workaround due to missing functionality.

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

No branches or pull requests

2 participants