gw2-api / issues

Issue tracker for the Guild Wars 2 API
https://discord.gg/zqeHCEg
16 stars 0 forks source link

World-vs-World restructuring #58

Closed ChalyFlavour closed 2 months ago

ChalyFlavour commented 1 year ago

Feature Description

Story

With the world-vs-world restructuring a "home world" would make no more sense for the world vs world when thinking about the world ID 1xxx (NA) or 2xxx (EU). Instead a new wvw_world ID should match the world IDs after wvw restructuring. Nowadays the worldattribute in the /v2/account endpoint is used for verification by most bots and voice chats.

Description

We need to know in which match a player participates in. We also need to know in which match a guild participates in.

Optionally the current selected "world-vs-world" guild isn't available in the API.

Implementation

We need two extensions to the API (including suggested endpoint paths)

  1. Add a new attribute to /v2/account showing the new wvw_world id (12001 for Moogooloo, 12002 for Titan's Staircase..)
  2. Add a new attribute to /v2/account showing the current world-vs-world match:id the account participates in as well as its color.
  3. Add a new endpoint /v2/wvw/matches/guilds/:id listing all guild:id that participates in the current match Optional
  4. Add an attribute to /v2/account showing the accounts currently selected/active guild:id for world-vs-world

I suggest not replacing the value of the current world as endless API application makes use of it. While not being part of this issue, it would totally make sense to extend the endpoint /v2/worlds to retrieve the new "server" names.

Example

/v2/account
{
"world": 1001,
"wvw_world": 12001,
"matchup": "3-1",
"matchup_color":"red",
"guild_wvw_active": "123456789-1234-1234-1234-1234567890ABC" 
}

/v2/wvw/matches/guilds/3-1
{
"red":
[
  "123456789-1234-1234-1234-1234567890ABC",
  "123456789-1234-1234-1234-1234567890ABD"
],
"green":
[
  "123456789-1234-1234-1234-1234567890ABE",
  "123456789-1234-1234-1234-1234567890ABF"
],
"blue":
[
  "123456789-1234-1234-1234-1234567890AC0"
]
}

Anything else?

No response

ChalyFlavour commented 1 year ago

after speaking to a lot of developers currently running and developing "verify" applications (such as bots for Discord, Mumble, TeamSpeak) i have added the wvw_world attribute to the issue. I also mentioned a possible extension of the endpoint /v2/worlds which, however, is not part of this issue

darthmaim commented 2 months ago

This data should now all be available in the API I think.

The endpoints are really new and might still change slightly, so feel free to report any feedback or still missing data, preferably on the GW2 Development Community Discord for now for faster turnaround and discussions.