Open lambada opened 8 months ago
Kinda related: Only the weekly meta_reward_item_id
is whitelisted, the daily chest is missing (https://api.guildwars2.com/v2/items?ids=99961,100137)
The objectives are missing the description that is visible in the tooltip ingame.
It would maybe also be useful to some to get the astral acclaim and objective type icons added to /v2/files
Suggestion: add ids=all
to the root endpoint, to get an aggregate of all the listings and objectives.
GET https://api.guildwars2.com/v2/wizardsvault?ids=all&lang=en&v=latest
@sliekens wouldn't it be kinda weird to use ids, because one might think ids=1 is then also possible?
I agree it's inconsistent with anything that came before it, other suggestions:
expand=listings,objectives
GET https://api.guildwars2.com/v2/wizardsvault?lang=en&v=latest
{
"title": "The Realm of Dreams Season",
"start": "2022-11-07T17:00:00Z",
"end": "2024-05-14T16:00:00Z",
"links": {
"listings": "/v2/wizardsvault/listings?lang=en&v=latest",
"objectives": "/v2/wizardsvault/objectives?lang=en&v=latest"
}
}
I've played around with the Wizard's Vault endpoints for a week now (you can test my implementation here: https://en.gw2treasures.com/wizards-vault).
The biggest issue is obviously the need to login to the game before it returns data, but the second biggest issue I've noticed is the cache time. The authenticated objectives endpoints return a cache max-age of 60 minutes. Even when requesting with no-cache
, data takes up to one hour to show up (fastest I've seen was about 5 minutes, average seems to be about 10 - 15 minutes). That makes the the endpoints basically useless to track daily objectives, because you will have completed all dailies before the endpoint even returns data for the correct day. The cache time should be dropped to max 5 minutes, better just 1 minute.
Just noticed that the /v2/wizardsvault/objectives
endpoint sometimes returns (wrong) localized data, I suspect the language is missing in some cache key.
Just noticed that the
/v2/wizardsvault/objectives
endpoint sometimes returns (wrong) localized data, I suspect the language is missing in some cache key.
I'm confirming this as well. These are requests made in a row (a few seconds apart), with the ?lang=fr
query parameter, returning a different result every time. The same happens with the Accept-Language
header, and all other languages.
What's worse is that the response headers include the content-language
header, but its value is set to the requested language, not the actual language used in the response. So we can't query the API a bunch of times until we get the right one, in order to persist the results on our side.
$ curl 'https://api.guildwars2.com/v2/wizardsvault/objectives/1?lang=fr'
{
"id": 1,
"title": "Complete 3 Events",
"track": "PvE",
"acclaim": 10
}
$ curl 'https://api.guildwars2.com/v2/wizardsvault/objectives/1?lang=fr'
{
"id": 1,
"title": "Complete 3 Events",
"track": "PvE",
"acclaim": 10
}
$ curl 'https://api.guildwars2.com/v2/wizardsvault/objectives/1?lang=fr'
{
"id": 1,
"title": "Schließt 3 Events ab",
"track": "PvE",
"acclaim": 10
}
$ curl 'https://api.guildwars2.com/v2/wizardsvault/objectives/1?lang=fr'
{
"id": 1,
"title": "Terminer 3 événements",
"track": "PvE",
"acclaim": 10
}
[Feedback gathered from GW2 API Dev Community after the WV API Release]
Localization problems
https://api.guildwars2.com/v2 shows
/v2/wizardsvault/listings
and/v2/wizardsvault/objectives
as being localised./v2/wizardsvault/listings
contains no localized data, so the flag is redundant./v2/wizardsvault
and/v2/wizardsvault/objectives
do not respect the lang query parameter, and so the objective names are not localized, despite being flagged as being localised/v2/account/wizardsvault/{daily,weekly,special}
contains localised data but is not flagged as being localised and does not respect the lang query parameterRedundant data
/v2/account/wizardsvault/{daily,weekly,special}
duplicates a lot of data fromv2/wizardsvault/objectives/:id
. It would be better for it to return justa simple array of objective IDs that match with the objectives APIan array of objects withid
,progress_current
,progress_complete
andclaimed
and notexpanded objects withredundant data liketitle
,track
oracclaim
. That would also remove the localised data for that endpoint.Missing data
/v2/wizardsvault/listings
should returnpurchase_limit
like thev2/account/wizardsvault/listings
endpoint does.Stale Data
v2/account
could contain"wizardsvault_tracks": ["PvE", "PvP"]
, and update/v2/wizardsvault/objectives
to have arequired_tracks
property or similar. This would then allow calculation of the current objectives without needing an account to have logged in./v2/account/wizardsvault/{daily,weekly,special}
can be misleading. If the above suggestion is implemented, then the API should show 0 progress if the account has not logged in for that day/week.