[Proposal] Structured PvP API

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

(I am aware that there is an area to post about APIs, but I think this is a better starting point for this conversation)

Having spent a bit of time watching how most streams for pvp events in GW2 look, I think there is room for ArenaNet to provide some data that would simplify greatly the streams, as well as provide them with real data to generate stats on and work with.

API layout.

It makes sense to layout the API under /v2/ with the rest of the new APIs (and get use of their oauth/new codebase.)

This Document attempts to describe both how it might work specifically and why to do it.

/v2/spvp # open rooms/matches
/v2/spvp/room/{$room_id} # Room information and link to the match in progress
/v2/spvp/match/{$match_id} # Match information

GET /v2/spvp

Attributes:

  • search – Search for a room name
  • limit – limit count to a number of results
  • offset – start showing with the Nth result (use with limit to paginate)

No Request Body.

Response Example:


{
    "rooms": [
        { 
     	    "name": "Server 023",
            "room_uri": "http://api.guildwars2.com/v2/spvp/room/42",
            "match_uri": http://api.guildwars2.com/v2/spvp/match/47947"
        },
        { 
	    "name": "The Plunderdome",
            "room_uri": "http://api.guildwars2.com/v2/spvp/room/1004882",
            "match_uri": "http://api.guildwars2.com/v2/spvp/match/47947"
        }
    ]
}

(Continues Next Post… 5000 characters… lol)

Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

GET /v2/spvp/room/{$room_id}

Attributes:

  • password: If the room is password protected, require that the password be provided.
    • Ignore the password if owner is logged in via oauth.

No Request Body

Response Example:


{
    "room": {
        "name": "The Plunderdome",
        "motd": "Plundering all day, yarr.",
        "team_size": 5,
        "score_limit": 500,
        "time_limit": 15,
        "respawn_time": 20,
        "respawn_type": "wave",
        "starting_players": 1,
        "reserved_slots": 0,
        "spectators": true,
        "ready_up": false,
        "autobalance": true,
        "lock_gear": false,
        "lock_skills": false,
        "progression": true,
        "force_respawn": false,
        "tournament_commands": false,
        "map_rotation": [
            "kyhlo",
            "forest",
            "legacy",
            "temple",
            "spirit_watch",
            "skyhammer",
            "courtyard
        ],
        "match_uri": "http://api.guildwars2.com/v2/spvp/match/47947"
    }
}

Optionally, show member players/guilds and banned players… but I don’t see it as a big deal.

Notes:

  • progression displays reverse of checkbox in the custom arena page (“No Progression” makes little sense)
  • match_uri is created as soon as the map loads and is active until a match begins and ends.
Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

GET /v2/spvp/match/{$match_id}

Attributes:

  • password: If the room for this match is password protected, require that the password be provided.
    • Ignore the password if owner is logged in via oauth.

No Request Body

Response Example (pre-match):


{
    "match": {
        "id": 24727692,
        "room_uri": "http://api.guildwars2.com/v2/spvp/room/1004882",
        "score": {
            "red": 0,
            "blue": 0,
        },
        "map": "temple",
        "time_left": false,
        "players": {
            "red": [
                { 
                    "account_id": "somebody.2392",
                    "class", "Guardian",
                    "weapons": [
                        {
                            "main_hand": "mace",
                            "sigil1": "Sigil of Energy",
                            "off_hand": "focus",
                            "sigil2": "Sigil of Intelligence"
                        },
                        {
                            "main_hand": "staff",
                            "sigil1": "Sigil of Energy",
                            "sigil2": "Sigil of Battle"
                        }
                    ],
                    "rune": "Rune of the Soldier",
                    "amulet": "Cleric",
                    "utilities": [
                       "Shelter",
                       "Hold the Line",
                       "Sanctuary",
                       "Stand Your Ground",
                       "Renewed Focus"
                    ],
                    "trait": {
                        "distribution": [0,1,6,6,1],
                        "points": [
                            [],
                            [],
                            [4,5,11],
                            [2,5,11],
                            []
                        ]
                    }
                },
                ... // repeat these 4 more times
            ],
            "blue": [
                {
                    "account_id": "somebodyelse.2492",
                    "class", "Guardian",
                    "weapons": [
                        {
                            "main_hand": "mace",
                            "sigil1": "Sigil of Energy",
                            "off_hand": "focus",
                            "sigil2": "Sigil of Intelligence"
                        },
                        {
                            "main_hand": "staff",
                            "sigil1": "Sigil of Energy",
                            "sigil2": "Sigil of Battle"
                        }
                    ],
                    "rune": "Rune of the Soldier",
                    "amulet": "Cleric",
                    "utilities": [
                       "Shelter",
                       "Hold the Line",
                       "Sanctuary",
                       "Stand Your Ground",
                       "Renewed Focus"
                    ],
                    "trait": {
                        "distribution": [0,1,6,6,1],
                        "points": [
                            [],
                            [],
                            [4,5,11],
                            [2,5,11],
                            []
                        ]
                    }
                },
                ... // repeat these 4 more times
            ]
        }
    }
 }            

(This Section is split between 2 posts)

Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

(edited by Lumiere.4609)

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

Response Example (in-match):


{
    "match": {
        "id": 24727692,
        "room_uri": "http://api.guildwars2.com/v2/spvp/room/1004882",
        "score": {
            "red": 0,
            "blue": 0,
        },
        "map": "temple",
        "time_left": false,
        "players": {
            "red": [
                { 
                    "account_id": "somebody.2392",
                    "name": "Some Name",
                    "class", "Guardian",
                    "weapons": [
                        {
                            "main_hand": "mace",
                            "sigil1": "Sigil of Energy",
                            "off_hand": "focus",
                            "sigil2": "Sigil of Intelligence"
                        },
                        {
                            "main_hand": "staff",
                            "sigil1": "Sigil of Energy",
                            "sigil2": "Sigil of Battle"
                        }
                    ],
                    "rune": "Rune of the Soldier",
                    "amulet": "Cleric",
                    "utilities": [
                       "Shelter",
                       "Hold the Line",
                       "Sanctuary",
                       "Stand Your Ground",
                       "Renewed Focus"
                    ],
                    "trait": {
                        "distribution": [0,1,6,6,1],
                        "points": [
                            [],
                            [],
                            [4,5,11],
                            [2,5,11],
                            []
                        ]
                    }
                    "events": [
                        {
                            "at": "00:30",
                            "type": "capture",
                            "point": "gate"
                        },
                        {
                            "at": "01:02",
                            "type" "kill",
                            "killed": "somebodyelse.2492"
                        },
                        {
                            "at": "06:51",
                            "type": "temple_buff",
                            "buff": "stillness"
                        },
                },
                ... // repeat these 4 more times
            ],
            "blue": [
                {
                    "account_id": "somebodyelse.2492",
                    "name": "Some Other Name",
                    "class", "Guardian",
                    "weapons": [
                        {
                            "main_hand": "mace",
                            "sigil1": "Sigil of Energy",
                            "off_hand": "focus",
                            "sigil2": "Sigil of Intelligence"
                        },
                        {
                            "main_hand": "staff",
                            "sigil1": "Sigil of Energy",
                            "sigil2": "Sigil of Battle"
                        }
                    ],
                    "rune": "Rune of the Soldier",
                    "amulet": "Cleric",
                    "utilities": [
                       "Shelter",
                       "Hold the Line",
                       "Sanctuary",
                       "Stand Your Ground",
                       "Renewed Focus"
                    ],
                    "trait": {
                        "distribution": [0,1,6,6,1],
                        "points": [
                            [],
                            [],
                            [4,5,11],
                            [2,5,11],
                            []
                        ]
                    }
                },
                ... // repeat these 4 more times
            ]
        }
    }
 }

Notes/Explaination:

  • Pre-Match the data provided is just the build itself, once the match starts it includes some event data to allow statistics to be generated, and to let someone post-match generate interesting tidbits to discuss like how quickly a team decapped behind their opponents.

Events:

  • Point Capture Neutralize Defend
  • Kills
  • Resses
  • Skirmisher
  • Map Special Events:
    • Temple Buffs
    • Kyhlo/Skyhammer Weapon Use/Hit
    • Forest Boss kills
    • Legacy Doors/Lord
    • Spirit Watch Orb pickup/drop/score (half/full)
  • Others?
Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

(edited by Lumiere.4609)

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

(Reserved for additional Refinement)

Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

(Also reserved) /15

Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

[Proposal] Structured PvP API

in PvP

Posted by: Shockwave.1230

Shockwave.1230

Perhaps the API should allow for passing an account name and password that would automatically return the match ID and/or the room ID?

Sylvari Elementalist – Mystree Duskbloom (Lv 80)
Norn Guardian – Aurora Lustyr (Lv 80)
Mia A Shadows Glow – Human Thief (Lv 80)

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

Perhaps the API should allow for passing an account name and password that would automatically return the match ID and/or the room ID?

OAuth will be the GW2 API standard for auth, but adding a search for account id’s is a possibility.

Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry

[Proposal] Structured PvP API

in PvP

Posted by: slausty.1238

slausty.1238

My man with the logic bomb (nerd pun). Good stuff buddy, I think this could only benefit the game!

[SF] [zH] Ubnext

[Proposal] Structured PvP API

in PvP

Posted by: Serdoc.7261

Serdoc.7261

Here here, good idea Lumiere.
+1!

I’m not sure, can you, umm…. do that again? ROM – 2015
#allisvain

[Proposal] Structured PvP API

in PvP

Posted by: Embracethefire.9186

Embracethefire.9186

Wicked Smat lumi

[Proposal] Structured PvP API

in PvP

Posted by: CntrlAltDefeat.1465

CntrlAltDefeat.1465

In all reality, this is most likely the most friendly language for engaging -some- of the development team. Props for trying.

[Proposal] Structured PvP API

in PvP

Posted by: Laodike.8640

Laodike.8640

In all reality, this is most likely the most friendly language for engaging -some- of the development team. Props for trying.

You mean we should engage them in this way, so that they only need to copy&pace?

[Proposal] Structured PvP API

in PvP

Posted by: Lumiere.4609

Lumiere.4609

In all reality, this is most likely the most friendly language for engaging -some- of the development team. Props for trying.

You mean we should engage them in this way, so that they only need to copy&pace?

I’m engaging them in the manner in which I came up with the idea (what would I be looking for if I was going to use it) because it is easiest for me, and I hope it works for them.

Yagami Yukari- 80 Sylvari Guardian | Yagami Vita – 80 Human Ele
Strike Force – Jade Quarry