summaryrefslogtreecommitdiff
path: root/source/players/players.rst
diff options
context:
space:
mode:
authorKen <kenny@madgloryint.com>2017-11-01 13:27:17 -0400
committerKen <kenny@madgloryint.com>2017-11-01 13:27:17 -0400
commit1385a3cefc7312a3f18e8d78a854411b53c75e67 (patch)
treef27292fc20215f68c25ab09830947da56fb732a9 /source/players/players.rst
parent0f19a09673be2bb79426e21a6460d5095f43287a (diff)
downloadvainglory-docs-1385a3cefc7312a3f18e8d78a854411b53c75e67.tar.gz
vainglory-docs-1385a3cefc7312a3f18e8d78a854411b53c75e67.zip
Initial commit of the new logs.
Diffstat (limited to 'source/players/players.rst')
-rw-r--r--source/players/players.rst105
1 files changed, 105 insertions, 0 deletions
diff --git a/source/players/players.rst b/source/players/players.rst
new file mode 100644
index 0000000..a8df6ba
--- /dev/null
+++ b/source/players/players.rst
@@ -0,0 +1,105 @@
+.. _players:
+
+Players
+=======
+
+Player objects contain aggregated lifetime information about each Player. At this time Players are fairly sparse, but there are plans to add much richer data as it becomes available.
+
+
+
+Get a Single Player
+--------------------
+
+This endpoint retrieves a specific player.
+
+*Please Note: Changes Coming! - Player resources are not fully defined at this point, but are included so that consumers can get basic info (name, etc.) This object will have additional data added over the next few months, and may change slightly as data moves from the ``attributes.stats`` object to the main `attributes` object.*
+
+**HTTP Request**
+
+| ``GET https://api.dc01.gamelockerapp.com/shards/na/players/<ID>``
+
+
+**URL Parameters**
+
+| Parameter: ID
+| Description: The ID of the player to retrieve
+
+
+**Shell:**
+
+.. code-block:: shell
+
+ curl "https://api.dc01.gamelockerapp.com/shards/na/players/<ID>" \
+ -H "Authorization: Bearer <api-key>" \
+ -H "Accept: application/vnd.api+json"
+
+ **The above command returns JSON structured like this:**
+
+ {{
+ "data": {
+ "attributes": {
+ "stats": {
+ "lossStreak": 1,
+ "winStreak": 0,
+ "lifetimeGold": 10536.0
+ },
+ "name": "boombastic04"
+ },
+ "type": "player",
+ "id": "6abb30de-7cb8-11e4-8bd3-06eb725f8a76"
+ }
+ }
+
+
+**Javascript:**
+
+.. code-block:: javascript
+
+ //There are a variety of Java HTTP libraries that support query-parameters.
+
+ **The above command returns JSON structured like this:**
+
+ {{
+ "data": {
+ "attributes": {
+ "stats": {
+ "lossStreak": 1,
+ "winStreak": 0,
+ "lifetimeGold": 10536.0
+ },
+ "name": "boombastic04"
+ },
+ "type": "player",
+ "id": "6abb30de-7cb8-11e4-8bd3-06eb725f8a76"
+ }
+ }
+
+
+Get a Collection of Players
+---------------------------
+
+This endpoint retrieves a collection of up to 6 players, filtered by name. Player names are specific to each region. If a player has changed names, it is possible that there are multiple ID's for a single player name.
+
+**HTTP Request**
+
+| ``GET https://api.dc01.gamelockerapp.com/shards/na/players``
+
+
+**Query Parameters**
+
+| Parameter: filter[playerNames]
+| Default: None
+| Description: Filters by player names. Usage: filter[playerNames]=player1,player2
+
+
+**Shell:**
+
+.. code-block:: shell
+
+ curl "https://api.dc01.gamelockerapp.com/shards/na/players?filter[playerNames]=player1,player2" \
+ -H "Authorization: Bearer <api-key>" \
+ -H "Accept: application/vnd.api+json"
+ }
+
+.. toctree::
+ :maxdepth: 2