AsherGlick / Burrito

An overlay tool for Guild Wars 2 that works on linux
GNU General Public License v2.0
74 stars 18 forks source link

GDScript GW2 API #128

Open AsherGlick opened 1 year ago

AsherGlick commented 1 year ago

As of writing there is no GW2 API module written in gdscript, There are some features for both existing marker attributes and for future plugin API. Implementing a gdscript interface for the entire API might be a little too ambitious so we will only focus on a few of the APIs.

This list may change, Festival and Achievements are required for marker attribute support but the others probably wont get implemented until after #21 is completed.

dlamkins commented 1 year ago

Hey, just a heads up regarding the active festival. Sometime last year, a change was made to the achievements API, which unintentionally began showing more achievements than should be visible, making festival detection no longer possible with this method.

With API fixes and development fairly slow on the ANET side, we've opted to resolve this ourselves with our own endpoint. Burrito is more than welcome to use this endpoint as well if you would like.

https://l.blishhud.com/general/getActiveFestivals

Implementation details are visible here: https://github.com/blish-hud/bhud-functions/blob/main/general/GetActiveFestivals.cs

Essentially, we perform the old method of the lookup. If we detect that all festivals are active (which should not be possible), we fall back to a manually updated field. This allows us to return to the previous method once the API changes are corrected without needing an application update. The response is an array of festival names. Of course, you should only expect it to contain one value currently, but it returns an array in case something new is introduced in the future.

This is an issue that I don't believe has yet been addressed by TacO directly, so I don't believe it is accurately handling the festival flag at this time.

Let me know if you have any questions. 👍

AsherGlick commented 1 year ago

Thanks @dlamkins. We will probably end up doing the same thing and falling back on your or another alternative endpoint. How do you keep your active festival endpoint up to date? Is it a manual process?

dlamkins commented 1 year ago

Yes, it's a manual process at this time. I've considered looking at performing some sort of evaluation with the wiki (or some other source), but currently, updating the endpoint every few weeks manually is a lot less time-consuming than devising another solution (at least so far). 😄

AsherGlick commented 1 year ago

We will probably use your blishhud API as a fallback at first, and maybe forever. I also opened a PR that has some festival wiki parsing stuff in it to possibly automate that or a similar API. Though it is still unknown if the automation will be stable or if it is just going to be a more complicated version of "manually updating every few weeks" due to breakages in the automation's assumptions every time a new festival is announced.