1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Players — Battelrite 0.2 documentation</title>
<link rel="stylesheet" href="../_static/css/battlerite.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Samples" href="../samples/samples.html" />
<link rel="prev" title="Match Data Summary" href="../match_data_summary/match_data_summary.html" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body>
<header id="BTT" role="banner">
<div class="menu-top-outer clearfix">
<div class="wrapper clearfix">
<a href="/" id="site-logo"></a>
<span id="logSignBtn" class="btn">Login / Signup</span>
<nav id="mainMenu" class="main-menu-con">
<ul class="main-menu clearfix">
<li><a class="active" href="guides.html">Documentation</a></li>
<li><a href="faq.html">Faqs</a></li>
<li><a href="creations.html">Creations</a></li>
</ul>
</nav>
</div>
</div>
</header>
<div class="related top">
<nav id="rellinks">
<ul>
<li>
←
<a href="../match_data_summary/match_data_summary.html" title="Previous document">Match Data Summary</a>
</li>
<li>
<a href="../samples/samples.html" title="Next document">Samples</a>
→
</li>
</ul>
</nav>
<nav id="breadcrumbs">
<ul>
<li><a href="../index.html">Battelrite 0.2 documentation</a></li>
</ul>
</nav>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="players">
<span id="id1"></span><h1>Players<a class="headerlink" href="#players" title="Permalink to this headline">¶</a></h1>
<p>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.</p>
<div class="section" id="get-a-single-player">
<h2>Get a Single Player<a class="headerlink" href="#get-a-single-player" title="Permalink to this headline">¶</a></h2>
<p>This endpoint retrieves a specific player.</p>
<p><em>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.</em></p>
<p><strong>HTTP Request</strong></p>
<div class="line-block">
<div class="line"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">https://api.dc01.gamelockerapp.com/shards/na/players/<ID></span></code></div>
</div>
<p><strong>URL Parameters</strong></p>
<div class="line-block">
<div class="line">Parameter: ID</div>
<div class="line">Description: The ID of the player to retrieve</div>
</div>
<p><strong>Shell:</strong></p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>curl <span class="s2">"https://api.dc01.gamelockerapp.com/shards/na/players/<ID>"</span> <span class="se">\</span>
-H <span class="s2">"Authorization: Bearer <api-key>"</span> <span class="se">\</span>
-H <span class="s2">"Accept: application/vnd.api+json"</span>
**The above <span class="nb">command</span> returns JSON structured like this:**
<span class="o">{{</span>
<span class="s2">"data"</span>: <span class="o">{</span>
<span class="s2">"attributes"</span>: <span class="o">{</span>
<span class="s2">"stats"</span>: <span class="o">{</span>
<span class="s2">"lossStreak"</span>: <span class="m">1</span>,
<span class="s2">"winStreak"</span>: <span class="m">0</span>,
<span class="s2">"lifetimeGold"</span>: <span class="m">10536</span>.0
<span class="o">}</span>,
<span class="s2">"name"</span>: <span class="s2">"boombastic04"</span>
<span class="o">}</span>,
<span class="s2">"type"</span>: <span class="s2">"player"</span>,
<span class="s2">"id"</span>: <span class="s2">"6abb30de-7cb8-11e4-8bd3-06eb725f8a76"</span>
<span class="o">}</span>
<span class="o">}</span>
</pre></div>
</div>
<p><strong>Javascript:</strong></p>
<div class="highlight-javascript"><div class="highlight"><pre><span></span><span class="c1">//There are a variety of Java HTTP libraries that support query-parameters.</span>
<span class="o">**</span><span class="nx">The</span> <span class="nx">above</span> <span class="nx">command</span> <span class="nx">returns</span> <span class="nx">JSON</span> <span class="nx">structured</span> <span class="nx">like</span> <span class="k">this</span><span class="o">:**</span>
<span class="p">{{</span>
<span class="s2">"data"</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">"attributes"</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">"stats"</span><span class="o">:</span> <span class="p">{</span>
<span class="s2">"lossStreak"</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="s2">"winStreak"</span><span class="o">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s2">"lifetimeGold"</span><span class="o">:</span> <span class="mf">10536.0</span>
<span class="p">},</span>
<span class="s2">"name"</span><span class="o">:</span> <span class="s2">"boombastic04"</span>
<span class="p">},</span>
<span class="s2">"type"</span><span class="o">:</span> <span class="s2">"player"</span><span class="p">,</span>
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"6abb30de-7cb8-11e4-8bd3-06eb725f8a76"</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="get-a-collection-of-players">
<h2>Get a Collection of Players<a class="headerlink" href="#get-a-collection-of-players" title="Permalink to this headline">¶</a></h2>
<p>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.</p>
<p><strong>HTTP Request</strong></p>
<div class="line-block">
<div class="line"><code class="docutils literal"><span class="pre">GET</span> <span class="pre">https://api.dc01.gamelockerapp.com/shards/na/players</span></code></div>
</div>
<p><strong>Query Parameters</strong></p>
<div class="line-block">
<div class="line">Parameter: filter[playerNames]</div>
<div class="line">Default: None</div>
<div class="line">Description: Filters by player names. Usage: filter[playerNames]=player1,player2</div>
</div>
<p><strong>Shell:</strong></p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>curl <span class="s2">"https://api.dc01.gamelockerapp.com/shards/na/players?filter[playerNames]=player1,player2"</span> <span class="se">\</span>
-H <span class="s2">"Authorization: Bearer <api-key>"</span> <span class="se">\</span>
-H <span class="s2">"Accept: application/vnd.api+json"</span>
<span class="o">}</span>
</pre></div>
</div>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../datacenters/datacenters.html">Datacenters</a></li>
<li class="toctree-l1"><a class="reference internal" href="../authorization/authorization.html">Authorization</a></li>
<li class="toctree-l1"><a class="reference internal" href="../titles/titles.html">Titles</a></li>
<li class="toctree-l1"><a class="reference internal" href="../makingrequests/makingrequests.html">Making Requests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../receivingresponses/receivingresponses.html">Receiving Responses</a></li>
<li class="toctree-l1"><a class="reference internal" href="../matches/matches.html">Matches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../match_data_summary/match_data_summary.html">Match Data Summary</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Players</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#get-a-single-player">Get a Single Player</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-a-collection-of-players">Get a Collection of Players</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../samples/samples.html">Samples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../telemetry/telemetry.html">Telemetry</a></li>
<li class="toctree-l1"><a class="reference internal" href="../teams/teams.html">Teams</a></li>
<li class="toctree-l1"><a class="reference internal" href="../links/links.html">Links</a></li>
<li class="toctree-l1"><a class="reference internal" href="../community_sdks/community_sdks.html">Community SDKs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../errors/errors.html">Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../changelog/changelog.html">Changelog</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related bottom">
<nav id="rellinks">
<ul>
<li>
←
<a href="../match_data_summary/match_data_summary.html" title="Previous document">Match Data Summary</a>
</li>
<li>
<a href="../samples/samples.html" title="Next document">Samples</a>
→
</li>
</ul>
</nav>
<nav id="breadcrumbs">
<ul>
<li><a href="../index.html">Battelrite 0.2 documentation</a></li>
</ul>
</nav>
</div>
</body>
</html>
|