-
-
Save nightlark/d824c172b31d18870d1e to your computer and use it in GitHub Desktop.
GW2 WebSocket API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server to client | |
version: | |
Indicates the version number of the api, and WebSocket subprotocol | |
{"apiVersion":"1.0.0", "version":6} | |
serviceStatus: | |
Sent when the API service is pausing, resuming, or shutting down | |
{"service": "shutdown/pause/resume"} | |
authorized: | |
Tells the client that the player authorized them to use the API | |
{"authorized": true} | |
identity: | |
The identity information for the player | |
{"identity": Obj} | |
context: | |
The context information for the player | |
{"context": {...}} | |
movementUpdate: | |
An update to the location of the camera/player has occurred | |
{ | |
"movementUpdate": | |
{ | |
"fAvatarPosition": [x, y, z], | |
"fAvatarFront": [x, y, z], | |
"fAvatarTop": [x, y, z], | |
"fCameraPosition": [x, y, z], | |
"fCameraFront": [x, y, z], | |
"fCameraTop": [x, y, z] | |
} | |
} | |
chatUpdate: | |
An update on an incoming chat message | |
{ | |
"chatUpdate": | |
{ | |
"timestamp": 1994-11-05T13:15:30Z, | |
"channel": "G1/G2/Squad/etc", | |
"name": "testchar", | |
"msg": "hey there everyone!" | |
} | |
} | |
error: | |
Something bad happened, here's what it is! | |
{"error": "You broke it!"} | |
Client to server | |
authorize: | |
{"appName": "myApp"} | |
enableLocation: | |
Indicates whether or not we want to receive location updates | |
{"enableLocation": true} | |
enableChat: | |
Indicates whether or not we want to receive chat updates | |
{"enableChat": true} | |
requestIdentity: | |
Requests the identity information | |
{"requestIdentity": true} | |
requestContext: | |
Requests the context information | |
{"requestContext": true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment