riotgames_api 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23b3fb3d0f6fc57faa84a84174e164bb62ba5ac9eb9a54368559c486846e9d66
4
- data.tar.gz: 76ce7e9b7c8ccf9fdd2461803e07311e616791d79a0f80e88bffdec35db1f850
3
+ metadata.gz: 81f2fa8022d47beeb76276d5f29ad959610a0d36aaf587095fea46f2ac678f02
4
+ data.tar.gz: dd882ca8b84e922981a095fc892d50d5bafc1f98cf90811229083854cd8d24d4
5
5
  SHA512:
6
- metadata.gz: 072d6c2e21e91e54772570d752c209f0b8d48266ba3d9d592ce6542dd5041a1fff708a4acca333c04e384b9c05f4e62912e2f141b8f1ca512248eb143913de6f
7
- data.tar.gz: 0a28c47720070459e437ef28c56a15da5e0186eb57c285c06988b6901542ff9afd167d319c375d2ec8041098f5326a1397ae7e8eed09bd3f6a2b2acd8c42e02f
6
+ metadata.gz: 4ac317691f6bab9cde602cf9d594324928fa2eabe05a1dd7f1c552f8bf7a54aa95529fe945cb46581ded3d65aa9cbf780725af4b036f242664d2dddf7021dcca
7
+ data.tar.gz: 347a3b697ceb84b641da69ce4d3284cdb5df3b134e5ddfa0d1d7c134c4f207deafd9535703826288a05a816112707c41f86567d0ab259b62688fa2f671f7e7c2
data/.gitignore CHANGED
@@ -2,7 +2,6 @@
2
2
  /.yardoc
3
3
  /_yardoc/
4
4
  /coverage/
5
- /doc/
6
5
  /pkg/
7
6
  /spec/reports/
8
7
  /tmp/
@@ -0,0 +1,5 @@
1
+ --output-dir ./docs
2
+ --no-private
3
+ --hide-void-return
4
+ --markup-provider=redcarpet
5
+ --markup=markdown
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Vinicius Brasil
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -39,4 +39,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
39
39
 
40
40
  ## Contributing
41
41
 
42
- Bug reports and pull requests are welcome on GitHub at https://github.com/vnbrs/riot_api.
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vnbrs/riotgames_api.
@@ -0,0 +1,384 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: RiotAPI
8
+
9
+ &mdash; Documentation by YARD 0.9.18
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "RiotAPI";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (R)</a> &raquo;
40
+
41
+
42
+ <span class="title">RiotAPI</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: RiotAPI
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/riot_api.rb<span class="defines">,<br />
82
+ lib/riot_api/client.rb,<br /> lib/riot_api/errors.rb,<br /> lib/riot_api/version.rb,<br /> lib/riot_api/resources/summoner.rb,<br /> lib/riot_api/resources/champion_mastery.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+
93
+
94
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="RiotAPI/ChampionMastery.html" title="RiotAPI::ChampionMastery (class)">ChampionMastery</a></span>, <span class='object_link'><a href="RiotAPI/Client.html" title="RiotAPI::Client (class)">Client</a></span>, <span class='object_link'><a href="RiotAPI/ClientNotConfiguredError.html" title="RiotAPI::ClientNotConfiguredError (class)">ClientNotConfiguredError</a></span>, <span class='object_link'><a href="RiotAPI/InvalidRequestError.html" title="RiotAPI::InvalidRequestError (class)">InvalidRequestError</a></span>, <span class='object_link'><a href="RiotAPI/ResponseError.html" title="RiotAPI::ResponseError (class)">ResponseError</a></span>, <span class='object_link'><a href="RiotAPI/Summoner.html" title="RiotAPI::Summoner (class)">Summoner</a></span>
95
+
96
+
97
+ </p>
98
+
99
+
100
+ <h2>
101
+ Constant Summary
102
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
103
+ </h2>
104
+
105
+ <dl class="constants">
106
+
107
+ <dt id="VERSION-constant" class="">VERSION =
108
+
109
+ </dt>
110
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
111
+
112
+ </dl>
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Class Method Summary
124
+ <small><a href="#" class="summary_toggle">collapse</a></small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#client-class_method" title="client (class method)">.<strong>client</strong> &#x21d2; RiotAPI::Client </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'><p>Gets the instance of +RiotAPI::Client+.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#configure-class_method" title="configure (class method)">.<strong>configure</strong>(api_key) &#x21d2; Object </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'><p>Sets up the initial configuration for the client to work.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#reset!-class_method" title="reset! (class method)">.<strong>reset!</strong> &#x21d2; Object </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+ <span class="summary_desc"><div class='inline'><p>Resets any configuration set by +RiotAPI.configure+.</p>
193
+ </div></span>
194
+
195
+ </li>
196
+
197
+
198
+ </ul>
199
+
200
+
201
+
202
+
203
+ <div id="class_method_details" class="method_details_list">
204
+ <h2>Class Method Details</h2>
205
+
206
+
207
+ <div class="method_details first">
208
+ <h3 class="signature first" id="client-class_method">
209
+
210
+ .<strong>client</strong> &#x21d2; <tt><span class='object_link'><a href="RiotAPI/Client.html" title="RiotAPI::Client (class)">RiotAPI::Client</a></span></tt>
211
+
212
+
213
+
214
+
215
+
216
+ </h3><div class="docstring">
217
+ <div class="discussion">
218
+ <p>Gets the instance of +RiotAPI::Client+. If the client hasn&#39;t been configured yet, it throws a
219
+ +RiotAPI::ClientNotConfiguredError+.</p>
220
+
221
+
222
+ </div>
223
+ </div>
224
+ <div class="tags">
225
+
226
+ <p class="tag_title">Returns:</p>
227
+ <ul class="return">
228
+
229
+ <li>
230
+
231
+
232
+ <span class='type'>(<tt><span class='object_link'><a href="RiotAPI/Client.html" title="RiotAPI::Client (class)">RiotAPI::Client</a></span></tt>)</span>
233
+
234
+
235
+
236
+ &mdash;
237
+ <div class='inline'><p>The singleton instance of the client</p>
238
+ </div>
239
+
240
+ </li>
241
+
242
+ </ul>
243
+
244
+ </div><table class="source_code">
245
+ <tr>
246
+ <td>
247
+ <pre class="lines">
248
+
249
+
250
+ 23
251
+ 24
252
+ 25
253
+ 26
254
+ 27
255
+ 28
256
+ 29</pre>
257
+ </td>
258
+ <td>
259
+ <pre class="code"><span class="info file"># File 'lib/riot_api.rb', line 23</span>
260
+
261
+ <span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
262
+ <span class='kw'>if</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
263
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="RiotAPI/ClientNotConfiguredError.html" title="RiotAPI::ClientNotConfiguredError (class)">ClientNotConfiguredError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>You must call RiotAPI.configure with your API key before calling the API</span><span class='tstring_end'>&quot;</span></span>
264
+ <span class='kw'>else</span>
265
+ <span class='ivar'>@client</span>
266
+ <span class='kw'>end</span>
267
+ <span class='kw'>end</span></pre>
268
+ </td>
269
+ </tr>
270
+ </table>
271
+ </div>
272
+
273
+ <div class="method_details ">
274
+ <h3 class="signature " id="configure-class_method">
275
+
276
+ .<strong>configure</strong>(api_key) &#x21d2; <tt>Object</tt>
277
+
278
+
279
+
280
+
281
+
282
+ </h3><div class="docstring">
283
+ <div class="discussion">
284
+ <p>Sets up the initial configuration for the client to work</p>
285
+
286
+
287
+ </div>
288
+ </div>
289
+ <div class="tags">
290
+ <p class="tag_title">Parameters:</p>
291
+ <ul class="param">
292
+
293
+ <li>
294
+
295
+ <span class='name'>api_key</span>
296
+
297
+
298
+ <span class='type'>(<tt>String</tt>)</span>
299
+
300
+
301
+
302
+ &mdash;
303
+ <div class='inline'><p>The Riot Games API key</p>
304
+ </div>
305
+
306
+ </li>
307
+
308
+ </ul>
309
+
310
+
311
+ </div><table class="source_code">
312
+ <tr>
313
+ <td>
314
+ <pre class="lines">
315
+
316
+
317
+ 11
318
+ 12
319
+ 13</pre>
320
+ </td>
321
+ <td>
322
+ <pre class="code"><span class="info file"># File 'lib/riot_api.rb', line 11</span>
323
+
324
+ <span class='kw'>def</span> <span class='id identifier rubyid_configure'>configure</span><span class='lparen'>(</span><span class='id identifier rubyid_api_key'>api_key</span><span class='rparen'>)</span>
325
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="RiotAPI/Client.html" title="RiotAPI::Client (class)">Client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RiotAPI/Client.html#initialize-instance_method" title="RiotAPI::Client#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_api_key'>api_key</span><span class='rparen'>)</span>
326
+ <span class='kw'>end</span></pre>
327
+ </td>
328
+ </tr>
329
+ </table>
330
+ </div>
331
+
332
+ <div class="method_details ">
333
+ <h3 class="signature " id="reset!-class_method">
334
+
335
+ .<strong>reset!</strong> &#x21d2; <tt>Object</tt>
336
+
337
+
338
+
339
+
340
+
341
+ </h3><div class="docstring">
342
+ <div class="discussion">
343
+ <p>Resets any configuration set by +RiotAPI.configure+</p>
344
+
345
+
346
+ </div>
347
+ </div>
348
+ <div class="tags">
349
+
350
+
351
+ </div><table class="source_code">
352
+ <tr>
353
+ <td>
354
+ <pre class="lines">
355
+
356
+
357
+ 16
358
+ 17
359
+ 18</pre>
360
+ </td>
361
+ <td>
362
+ <pre class="code"><span class="info file"># File 'lib/riot_api.rb', line 16</span>
363
+
364
+ <span class='kw'>def</span> <span class='id identifier rubyid_reset!'>reset!</span>
365
+ <span class='ivar'>@client</span> <span class='op'>=</span> <span class='kw'>nil</span>
366
+ <span class='kw'>end</span></pre>
367
+ </td>
368
+ </tr>
369
+ </table>
370
+ </div>
371
+
372
+ </div>
373
+
374
+ </div>
375
+
376
+ <div id="footer">
377
+ Generated on Mon Apr 1 18:45:16 2019 by
378
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
379
+ 0.9.18 (ruby-2.6.2).
380
+ </div>
381
+
382
+ </div>
383
+ </body>
384
+ </html>
@@ -0,0 +1,1319 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: RiotAPI::ChampionMastery
8
+
9
+ &mdash; Documentation by YARD 0.9.18
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "RiotAPI::ChampionMastery";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span>
41
+ &raquo;
42
+ <span class="title">ChampionMastery</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: RiotAPI::ChampionMastery
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">RiotAPI::ChampionMastery</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/riot_api/resources/champion_mastery.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#champion_id-instance_method" title="#champion_id (instance method)">#<strong>champion_id</strong> &#x21d2; Object </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'><p>Champion ID for this entry.</p>
130
+ </div></span>
131
+
132
+ </li>
133
+
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#champion_level-instance_method" title="#champion_level (instance method)">#<strong>champion_level</strong> &#x21d2; Object </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <span class="summary_desc"><div class='inline'><p>Champion level for specified player and champion combination.</p>
156
+ </div></span>
157
+
158
+ </li>
159
+
160
+
161
+ <li class="public ">
162
+ <span class="summary_signature">
163
+
164
+ <a href="#champion_points-instance_method" title="#champion_points (instance method)">#<strong>champion_points</strong> &#x21d2; Object </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'><p>Total number of champion points for this player and champion combination - they are used to determine championLevel.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#champion_points_since_last_level-instance_method" title="#champion_points_since_last_level (instance method)">#<strong>champion_points_since_last_level</strong> &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'><p>Number of points earned since current level has been achieved.</p>
208
+ </div></span>
209
+
210
+ </li>
211
+
212
+
213
+ <li class="public ">
214
+ <span class="summary_signature">
215
+
216
+ <a href="#champion_points_until_next_level-instance_method" title="#champion_points_until_next_level (instance method)">#<strong>champion_points_until_next_level</strong> &#x21d2; Object </a>
217
+
218
+
219
+
220
+ </span>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+ <span class="summary_desc"><div class='inline'><p>Number of points needed to achieve next level.</p>
234
+ </div></span>
235
+
236
+ </li>
237
+
238
+
239
+ <li class="public ">
240
+ <span class="summary_signature">
241
+
242
+ <a href="#chest_granted-instance_method" title="#chest_granted (instance method)">#<strong>chest_granted</strong> &#x21d2; Object </a>
243
+
244
+
245
+
246
+ </span>
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <span class="summary_desc"><div class='inline'><p>Is chest granted for this champion or not in current season.</p>
260
+ </div></span>
261
+
262
+ </li>
263
+
264
+
265
+ <li class="public ">
266
+ <span class="summary_signature">
267
+
268
+ <a href="#last_play_time-instance_method" title="#last_play_time (instance method)">#<strong>last_play_time</strong> &#x21d2; Object </a>
269
+
270
+
271
+
272
+ </span>
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+ <span class="summary_desc"><div class='inline'><p>Last time this champion was played by this player - in Unix milliseconds time format.</p>
286
+ </div></span>
287
+
288
+ </li>
289
+
290
+
291
+ <li class="public ">
292
+ <span class="summary_signature">
293
+
294
+ <a href="#summoner_id-instance_method" title="#summoner_id (instance method)">#<strong>summoner_id</strong> &#x21d2; Object </a>
295
+
296
+
297
+
298
+ </span>
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+ <span class="summary_desc"><div class='inline'><p>Summoner ID for this entry.</p>
312
+ </div></span>
313
+
314
+ </li>
315
+
316
+
317
+ <li class="public ">
318
+ <span class="summary_signature">
319
+
320
+ <a href="#tokens_earned-instance_method" title="#tokens_earned (instance method)">#<strong>tokens_earned</strong> &#x21d2; Object </a>
321
+
322
+
323
+
324
+ </span>
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+ <span class="summary_desc"><div class='inline'><p>The token earned for this champion to levelup.</p>
338
+ </div></span>
339
+
340
+ </li>
341
+
342
+
343
+ </ul>
344
+
345
+
346
+
347
+
348
+
349
+ <h2>
350
+ Class Method Summary
351
+ <small><a href="#" class="summary_toggle">collapse</a></small>
352
+ </h2>
353
+
354
+ <ul class="summary">
355
+
356
+ <li class="public ">
357
+ <span class="summary_signature">
358
+
359
+ <a href="#find-class_method" title="find (class method)">.<strong>find</strong>(options = {}) &#x21d2; RiotAPI::ChampionMastery </a>
360
+
361
+
362
+
363
+ </span>
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <span class="summary_desc"><div class='inline'><p>Finds the summoner mastery for a specific champion.</p>
374
+ </div></span>
375
+
376
+ </li>
377
+
378
+
379
+ <li class="public ">
380
+ <span class="summary_signature">
381
+
382
+ <a href="#from_json-class_method" title="from_json (class method)">.<strong>from_json</strong>(json) &#x21d2; Object </a>
383
+
384
+
385
+
386
+ </span>
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+ <span class="summary_desc"><div class='inline'></div></span>
397
+
398
+ </li>
399
+
400
+
401
+ <li class="public ">
402
+ <span class="summary_signature">
403
+
404
+ <a href="#score_sum-class_method" title="score_sum (class method)">.<strong>score_sum</strong>(options = {}) &#x21d2; Integer </a>
405
+
406
+
407
+
408
+ </span>
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+ <span class="summary_desc"><div class='inline'><p>Get a player&#39;s total champion mastery score, which is the sum of individual champion mastery levels.</p>
419
+ </div></span>
420
+
421
+ </li>
422
+
423
+
424
+ <li class="public ">
425
+ <span class="summary_signature">
426
+
427
+ <a href="#where-class_method" title="where (class method)">.<strong>where</strong>(options = {}) &#x21d2; Array&lt;RiotAPI::ChampionMastery&gt; </a>
428
+
429
+
430
+
431
+ </span>
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+ <span class="summary_desc"><div class='inline'><p>Finds all champion mastery information for a specific summoner.</p>
442
+ </div></span>
443
+
444
+ </li>
445
+
446
+
447
+ </ul>
448
+
449
+
450
+
451
+ <div id="instance_attr_details" class="attr_details">
452
+ <h2>Instance Attribute Details</h2>
453
+
454
+
455
+ <span id="champion_id=-instance_method"></span>
456
+ <div class="method_details first">
457
+ <h3 class="signature first" id="champion_id-instance_method">
458
+
459
+ #<strong>champion_id</strong> &#x21d2; <tt>Object</tt>
460
+
461
+
462
+
463
+
464
+
465
+ </h3><div class="docstring">
466
+ <div class="discussion">
467
+ <p>Champion ID for this entry.</p>
468
+
469
+
470
+ </div>
471
+ </div>
472
+ <div class="tags">
473
+
474
+
475
+ </div><table class="source_code">
476
+ <tr>
477
+ <td>
478
+ <pre class="lines">
479
+
480
+
481
+ 13
482
+ 14
483
+ 15</pre>
484
+ </td>
485
+ <td>
486
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 13</span>
487
+
488
+ <span class='kw'>def</span> <span class='id identifier rubyid_champion_id'>champion_id</span>
489
+ <span class='ivar'>@champion_id</span>
490
+ <span class='kw'>end</span></pre>
491
+ </td>
492
+ </tr>
493
+ </table>
494
+ </div>
495
+
496
+
497
+ <span id="champion_level=-instance_method"></span>
498
+ <div class="method_details ">
499
+ <h3 class="signature " id="champion_level-instance_method">
500
+
501
+ #<strong>champion_level</strong> &#x21d2; <tt>Object</tt>
502
+
503
+
504
+
505
+
506
+
507
+ </h3><div class="docstring">
508
+ <div class="discussion">
509
+ <p>Champion level for specified player and champion combination.</p>
510
+
511
+
512
+ </div>
513
+ </div>
514
+ <div class="tags">
515
+
516
+
517
+ </div><table class="source_code">
518
+ <tr>
519
+ <td>
520
+ <pre class="lines">
521
+
522
+
523
+ 7
524
+ 8
525
+ 9</pre>
526
+ </td>
527
+ <td>
528
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 7</span>
529
+
530
+ <span class='kw'>def</span> <span class='id identifier rubyid_champion_level'>champion_level</span>
531
+ <span class='ivar'>@champion_level</span>
532
+ <span class='kw'>end</span></pre>
533
+ </td>
534
+ </tr>
535
+ </table>
536
+ </div>
537
+
538
+
539
+ <span id="champion_points=-instance_method"></span>
540
+ <div class="method_details ">
541
+ <h3 class="signature " id="champion_points-instance_method">
542
+
543
+ #<strong>champion_points</strong> &#x21d2; <tt>Object</tt>
544
+
545
+
546
+
547
+
548
+
549
+ </h3><div class="docstring">
550
+ <div class="discussion">
551
+ <p>Total number of champion points for this player and champion combination - they are used to determine championLevel.</p>
552
+
553
+
554
+ </div>
555
+ </div>
556
+ <div class="tags">
557
+
558
+
559
+ </div><table class="source_code">
560
+ <tr>
561
+ <td>
562
+ <pre class="lines">
563
+
564
+
565
+ 10
566
+ 11
567
+ 12</pre>
568
+ </td>
569
+ <td>
570
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 10</span>
571
+
572
+ <span class='kw'>def</span> <span class='id identifier rubyid_champion_points'>champion_points</span>
573
+ <span class='ivar'>@champion_points</span>
574
+ <span class='kw'>end</span></pre>
575
+ </td>
576
+ </tr>
577
+ </table>
578
+ </div>
579
+
580
+
581
+ <span id="champion_points_since_last_level=-instance_method"></span>
582
+ <div class="method_details ">
583
+ <h3 class="signature " id="champion_points_since_last_level-instance_method">
584
+
585
+ #<strong>champion_points_since_last_level</strong> &#x21d2; <tt>Object</tt>
586
+
587
+
588
+
589
+
590
+
591
+ </h3><div class="docstring">
592
+ <div class="discussion">
593
+ <p>Number of points earned since current level has been achieved.</p>
594
+
595
+
596
+ </div>
597
+ </div>
598
+ <div class="tags">
599
+
600
+
601
+ </div><table class="source_code">
602
+ <tr>
603
+ <td>
604
+ <pre class="lines">
605
+
606
+
607
+ 25
608
+ 26
609
+ 27</pre>
610
+ </td>
611
+ <td>
612
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 25</span>
613
+
614
+ <span class='kw'>def</span> <span class='id identifier rubyid_champion_points_since_last_level'>champion_points_since_last_level</span>
615
+ <span class='ivar'>@champion_points_since_last_level</span>
616
+ <span class='kw'>end</span></pre>
617
+ </td>
618
+ </tr>
619
+ </table>
620
+ </div>
621
+
622
+
623
+ <span id="champion_points_until_next_level=-instance_method"></span>
624
+ <div class="method_details ">
625
+ <h3 class="signature " id="champion_points_until_next_level-instance_method">
626
+
627
+ #<strong>champion_points_until_next_level</strong> &#x21d2; <tt>Object</tt>
628
+
629
+
630
+
631
+
632
+
633
+ </h3><div class="docstring">
634
+ <div class="discussion">
635
+ <p>Number of points needed to achieve next level. Zero if player reached maximum champion level for this champion.</p>
636
+
637
+
638
+ </div>
639
+ </div>
640
+ <div class="tags">
641
+
642
+
643
+ </div><table class="source_code">
644
+ <tr>
645
+ <td>
646
+ <pre class="lines">
647
+
648
+
649
+ 16
650
+ 17
651
+ 18</pre>
652
+ </td>
653
+ <td>
654
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 16</span>
655
+
656
+ <span class='kw'>def</span> <span class='id identifier rubyid_champion_points_until_next_level'>champion_points_until_next_level</span>
657
+ <span class='ivar'>@champion_points_until_next_level</span>
658
+ <span class='kw'>end</span></pre>
659
+ </td>
660
+ </tr>
661
+ </table>
662
+ </div>
663
+
664
+
665
+ <span id="chest_granted=-instance_method"></span>
666
+ <div class="method_details ">
667
+ <h3 class="signature " id="chest_granted-instance_method">
668
+
669
+ #<strong>chest_granted</strong> &#x21d2; <tt>Object</tt>
670
+
671
+
672
+
673
+
674
+
675
+ </h3><div class="docstring">
676
+ <div class="discussion">
677
+ <p>Is chest granted for this champion or not in current season.</p>
678
+
679
+
680
+ </div>
681
+ </div>
682
+ <div class="tags">
683
+
684
+
685
+ </div><table class="source_code">
686
+ <tr>
687
+ <td>
688
+ <pre class="lines">
689
+
690
+
691
+ 4
692
+ 5
693
+ 6</pre>
694
+ </td>
695
+ <td>
696
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 4</span>
697
+
698
+ <span class='kw'>def</span> <span class='id identifier rubyid_chest_granted'>chest_granted</span>
699
+ <span class='ivar'>@chest_granted</span>
700
+ <span class='kw'>end</span></pre>
701
+ </td>
702
+ </tr>
703
+ </table>
704
+ </div>
705
+
706
+
707
+ <span id="last_play_time=-instance_method"></span>
708
+ <div class="method_details ">
709
+ <h3 class="signature " id="last_play_time-instance_method">
710
+
711
+ #<strong>last_play_time</strong> &#x21d2; <tt>Object</tt>
712
+
713
+
714
+
715
+
716
+
717
+ </h3><div class="docstring">
718
+ <div class="discussion">
719
+ <p>Last time this champion was played by this player - in Unix milliseconds time format.</p>
720
+
721
+
722
+ </div>
723
+ </div>
724
+ <div class="tags">
725
+
726
+
727
+ </div><table class="source_code">
728
+ <tr>
729
+ <td>
730
+ <pre class="lines">
731
+
732
+
733
+ 19
734
+ 20
735
+ 21</pre>
736
+ </td>
737
+ <td>
738
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 19</span>
739
+
740
+ <span class='kw'>def</span> <span class='id identifier rubyid_last_play_time'>last_play_time</span>
741
+ <span class='ivar'>@last_play_time</span>
742
+ <span class='kw'>end</span></pre>
743
+ </td>
744
+ </tr>
745
+ </table>
746
+ </div>
747
+
748
+
749
+ <span id="summoner_id=-instance_method"></span>
750
+ <div class="method_details ">
751
+ <h3 class="signature " id="summoner_id-instance_method">
752
+
753
+ #<strong>summoner_id</strong> &#x21d2; <tt>Object</tt>
754
+
755
+
756
+
757
+
758
+
759
+ </h3><div class="docstring">
760
+ <div class="discussion">
761
+ <p>Summoner ID for this entry. (Encrypted)</p>
762
+
763
+
764
+ </div>
765
+ </div>
766
+ <div class="tags">
767
+
768
+
769
+ </div><table class="source_code">
770
+ <tr>
771
+ <td>
772
+ <pre class="lines">
773
+
774
+
775
+ 28
776
+ 29
777
+ 30</pre>
778
+ </td>
779
+ <td>
780
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 28</span>
781
+
782
+ <span class='kw'>def</span> <span class='id identifier rubyid_summoner_id'>summoner_id</span>
783
+ <span class='ivar'>@summoner_id</span>
784
+ <span class='kw'>end</span></pre>
785
+ </td>
786
+ </tr>
787
+ </table>
788
+ </div>
789
+
790
+
791
+ <span id="tokens_earned=-instance_method"></span>
792
+ <div class="method_details ">
793
+ <h3 class="signature " id="tokens_earned-instance_method">
794
+
795
+ #<strong>tokens_earned</strong> &#x21d2; <tt>Object</tt>
796
+
797
+
798
+
799
+
800
+
801
+ </h3><div class="docstring">
802
+ <div class="discussion">
803
+ <p>The token earned for this champion to levelup.</p>
804
+
805
+
806
+ </div>
807
+ </div>
808
+ <div class="tags">
809
+
810
+
811
+ </div><table class="source_code">
812
+ <tr>
813
+ <td>
814
+ <pre class="lines">
815
+
816
+
817
+ 22
818
+ 23
819
+ 24</pre>
820
+ </td>
821
+ <td>
822
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 22</span>
823
+
824
+ <span class='kw'>def</span> <span class='id identifier rubyid_tokens_earned'>tokens_earned</span>
825
+ <span class='ivar'>@tokens_earned</span>
826
+ <span class='kw'>end</span></pre>
827
+ </td>
828
+ </tr>
829
+ </table>
830
+ </div>
831
+
832
+ </div>
833
+
834
+
835
+ <div id="class_method_details" class="method_details_list">
836
+ <h2>Class Method Details</h2>
837
+
838
+
839
+ <div class="method_details first">
840
+ <h3 class="signature first" id="find-class_method">
841
+
842
+ .<strong>find</strong>(options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">RiotAPI::ChampionMastery</a></span></tt>
843
+
844
+
845
+
846
+
847
+
848
+ </h3><div class="docstring">
849
+ <div class="discussion">
850
+ <p>Finds the summoner mastery for a specific champion.</p>
851
+
852
+
853
+ </div>
854
+ </div>
855
+ <div class="tags">
856
+
857
+ <div class="examples">
858
+ <p class="tag_title">Examples:</p>
859
+
860
+
861
+ <p class="example_title"><div class='inline'><p>Find a summoner&#39;s mastery info with Irelia</p>
862
+ </div></p>
863
+
864
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">ChampionMastery</a></span></span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='label'>region:</span> <span class='symbol'>:br</span><span class='comma'>,</span> <span class='label'>summoner_id:</span> <span class='id identifier rubyid_summoner'>summoner</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='label'>champion_id:</span> <span class='int'>23</span><span class='rparen'>)</span></code></pre>
865
+
866
+ </div>
867
+ <p class="tag_title">Parameters:</p>
868
+ <ul class="param">
869
+
870
+ <li>
871
+
872
+ <span class='name'>options</span>
873
+
874
+
875
+ <span class='type'>(<tt>Hash</tt>)</span>
876
+
877
+
878
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
879
+
880
+
881
+ &mdash;
882
+ <div class='inline'><p>The options and filters to find the mastery info</p>
883
+ </div>
884
+
885
+ </li>
886
+
887
+ </ul>
888
+
889
+
890
+
891
+
892
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
893
+ <ul class="option">
894
+
895
+ <li>
896
+ <span class="name">:region</span>
897
+ <span class="type">(<tt>String</tt>)</span>
898
+ <span class="default">
899
+
900
+ </span>
901
+
902
+ &mdash; <div class='inline'><p>The League of Legends region associated with the account (e.g. +:br+, +:na+, etc)</p>
903
+ </div>
904
+
905
+ </li>
906
+
907
+ <li>
908
+ <span class="name">:summoner_id</span>
909
+ <span class="type">(<tt>String</tt>)</span>
910
+ <span class="default">
911
+
912
+ </span>
913
+
914
+ &mdash; <div class='inline'><p>The encrypted summoner ID</p>
915
+ </div>
916
+
917
+ </li>
918
+
919
+ <li>
920
+ <span class="name">:champion_id</span>
921
+ <span class="type">(<tt>String</tt>)</span>
922
+ <span class="default">
923
+
924
+ </span>
925
+
926
+ &mdash; <div class='inline'><p>The champion ID</p>
927
+ </div>
928
+
929
+ </li>
930
+
931
+ </ul>
932
+
933
+
934
+ <p class="tag_title">Returns:</p>
935
+ <ul class="return">
936
+
937
+ <li>
938
+
939
+
940
+ <span class='type'>(<tt><span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">RiotAPI::ChampionMastery</a></span></tt>)</span>
941
+
942
+
943
+
944
+ &mdash;
945
+ <div class='inline'><p>The champion mastery info</p>
946
+ </div>
947
+
948
+ </li>
949
+
950
+ </ul>
951
+
952
+ </div><table class="source_code">
953
+ <tr>
954
+ <td>
955
+ <pre class="lines">
956
+
957
+
958
+ 38
959
+ 39
960
+ 40
961
+ 41
962
+ 42
963
+ 43
964
+ 44
965
+ 45
966
+ 46
967
+ 47</pre>
968
+ </td>
969
+ <td>
970
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 38</span>
971
+
972
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
973
+ <span class='id identifier rubyid_mandatory_options'>mandatory_options</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:region</span><span class='comma'>,</span> <span class='symbol'>:summoner_id</span><span class='comma'>,</span> <span class='symbol'>:champion_id</span><span class='rbracket'>]</span>
974
+ <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_mandatory_options'>mandatory_options</span> <span class='op'>-</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
975
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A required parameter was not informed. The required paramaters are </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mandatory_options'>mandatory_options</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
976
+ <span class='kw'>end</span>
977
+
978
+ <span class='id identifier rubyid_request_url'>request_url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/lol/champion-mastery/v4/champion-masteries/by-summoner/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:summoner_id</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>/by-champion/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:champion_id</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
979
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span><span class='period'>.</span><span class='id identifier rubyid_client'><span class='object_link'><a href="../RiotAPI.html#client-class_method" title="RiotAPI.client (method)">client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_request'><span class='object_link'><a href="Client.html#request-instance_method" title="RiotAPI::Client#request (method)">request</a></span></span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_request_url'>request_url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:region</span><span class='rbracket'>]</span><span class='rparen'>)</span>
980
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span>
981
+ <span class='kw'>end</span></pre>
982
+ </td>
983
+ </tr>
984
+ </table>
985
+ </div>
986
+
987
+ <div class="method_details ">
988
+ <h3 class="signature " id="from_json-class_method">
989
+
990
+ .<strong>from_json</strong>(json) &#x21d2; <tt>Object</tt>
991
+
992
+
993
+
994
+
995
+
996
+ </h3><table class="source_code">
997
+ <tr>
998
+ <td>
999
+ <pre class="lines">
1000
+
1001
+
1002
+ 85
1003
+ 86
1004
+ 87
1005
+ 88
1006
+ 89
1007
+ 90
1008
+ 91
1009
+ 92
1010
+ 93
1011
+ 94
1012
+ 95
1013
+ 96
1014
+ 97</pre>
1015
+ </td>
1016
+ <td>
1017
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 85</span>
1018
+
1019
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_json'>json</span><span class='rparen'>)</span>
1020
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span>
1021
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_chest_granted'>chest_granted</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>chestGranted</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1022
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_champion_level'>champion_level</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>championLevel</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1023
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_champion_points'>champion_points</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>championPoints</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1024
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_champion_id'>champion_id</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>championId</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1025
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_champion_points_until_next_level'>champion_points_until_next_level</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>championPointsUntilNextLevel</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1026
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_last_play_time'>last_play_time</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>lastPlayTime</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1027
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_tokens_earned'>tokens_earned</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>tokensEarned</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1028
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_champion_points_since_last_level'>champion_points_since_last_level</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>championPointsSinceLastLevel</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1029
+ <span class='id identifier rubyid_s'>s</span><span class='period'>.</span><span class='id identifier rubyid_summoner_id'>summoner_id</span> <span class='op'>=</span> <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>summonerId</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1030
+ <span class='kw'>end</span>
1031
+ <span class='kw'>end</span></pre>
1032
+ </td>
1033
+ </tr>
1034
+ </table>
1035
+ </div>
1036
+
1037
+ <div class="method_details ">
1038
+ <h3 class="signature " id="score_sum-class_method">
1039
+
1040
+ .<strong>score_sum</strong>(options = {}) &#x21d2; <tt>Integer</tt>
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+ </h3><div class="docstring">
1047
+ <div class="discussion">
1048
+ <p>Get a player&#39;s total champion mastery score, which is the sum of individual champion mastery levels.</p>
1049
+
1050
+
1051
+ </div>
1052
+ </div>
1053
+ <div class="tags">
1054
+
1055
+ <div class="examples">
1056
+ <p class="tag_title">Examples:</p>
1057
+
1058
+
1059
+ <p class="example_title"><div class='inline'><p>Find a summoner total champion mastery score</p>
1060
+ </div></p>
1061
+
1062
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">ChampionMastery</a></span></span><span class='period'>.</span><span class='id identifier rubyid_point_sum'>point_sum</span><span class='lparen'>(</span><span class='label'>region:</span> <span class='symbol'>:br</span><span class='comma'>,</span> <span class='label'>summoner_id:</span> <span class='id identifier rubyid_summoner'>summoner</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span></code></pre>
1063
+
1064
+ </div>
1065
+ <p class="tag_title">Parameters:</p>
1066
+ <ul class="param">
1067
+
1068
+ <li>
1069
+
1070
+ <span class='name'>options</span>
1071
+
1072
+
1073
+ <span class='type'>(<tt>Hash</tt>)</span>
1074
+
1075
+
1076
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1077
+
1078
+
1079
+ &mdash;
1080
+ <div class='inline'><p>The options and filters to find the mastery points sum</p>
1081
+ </div>
1082
+
1083
+ </li>
1084
+
1085
+ </ul>
1086
+
1087
+
1088
+
1089
+
1090
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
1091
+ <ul class="option">
1092
+
1093
+ <li>
1094
+ <span class="name">:region</span>
1095
+ <span class="type">(<tt>String</tt>)</span>
1096
+ <span class="default">
1097
+
1098
+ </span>
1099
+
1100
+ &mdash; <div class='inline'><p>The League of Legends region associated with the account (e.g. +:br+, +:na+, etc)</p>
1101
+ </div>
1102
+
1103
+ </li>
1104
+
1105
+ <li>
1106
+ <span class="name">:summoner_id</span>
1107
+ <span class="type">(<tt>String</tt>)</span>
1108
+ <span class="default">
1109
+
1110
+ </span>
1111
+
1112
+ &mdash; <div class='inline'><p>The encrypted summoner ID</p>
1113
+ </div>
1114
+
1115
+ </li>
1116
+
1117
+ </ul>
1118
+
1119
+
1120
+ <p class="tag_title">Returns:</p>
1121
+ <ul class="return">
1122
+
1123
+ <li>
1124
+
1125
+
1126
+ <span class='type'>(<tt>Integer</tt>)</span>
1127
+
1128
+
1129
+
1130
+ &mdash;
1131
+ <div class='inline'><p>The player&#39;s total champion mastery score</p>
1132
+ </div>
1133
+
1134
+ </li>
1135
+
1136
+ </ul>
1137
+
1138
+ </div><table class="source_code">
1139
+ <tr>
1140
+ <td>
1141
+ <pre class="lines">
1142
+
1143
+
1144
+ 75
1145
+ 76
1146
+ 77
1147
+ 78
1148
+ 79
1149
+ 80
1150
+ 81
1151
+ 82
1152
+ 83</pre>
1153
+ </td>
1154
+ <td>
1155
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 75</span>
1156
+
1157
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_score_sum'>score_sum</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1158
+ <span class='id identifier rubyid_mandatory_options'>mandatory_options</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:region</span><span class='comma'>,</span> <span class='symbol'>:summoner_id</span><span class='rbracket'>]</span>
1159
+ <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_mandatory_options'>mandatory_options</span> <span class='op'>-</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1160
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A required parameter was not informed. The required paramaters are </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mandatory_options'>mandatory_options</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1161
+ <span class='kw'>end</span>
1162
+
1163
+ <span class='id identifier rubyid_request_url'>request_url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/lol/champion-mastery/v4/scores/by-summoner/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:summoner_id</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1164
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span><span class='period'>.</span><span class='id identifier rubyid_client'><span class='object_link'><a href="../RiotAPI.html#client-class_method" title="RiotAPI.client (method)">client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_request'><span class='object_link'><a href="Client.html#request-instance_method" title="RiotAPI::Client#request (method)">request</a></span></span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_request_url'>request_url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:region</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1165
+ <span class='kw'>end</span></pre>
1166
+ </td>
1167
+ </tr>
1168
+ </table>
1169
+ </div>
1170
+
1171
+ <div class="method_details ">
1172
+ <h3 class="signature " id="where-class_method">
1173
+
1174
+ .<strong>where</strong>(options = {}) &#x21d2; <tt>Array&lt;<span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">RiotAPI::ChampionMastery</a></span>&gt;</tt>
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+ </h3><div class="docstring">
1181
+ <div class="discussion">
1182
+ <p>Finds all champion mastery information for a specific summoner.</p>
1183
+
1184
+
1185
+ </div>
1186
+ </div>
1187
+ <div class="tags">
1188
+
1189
+ <div class="examples">
1190
+ <p class="tag_title">Examples:</p>
1191
+
1192
+
1193
+ <p class="example_title"><div class='inline'><p>Find a summoner&#39;s list of champion mastery</p>
1194
+ </div></p>
1195
+
1196
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">ChampionMastery</a></span></span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>region:</span> <span class='symbol'>:br</span><span class='comma'>,</span> <span class='label'>summoner_id:</span> <span class='id identifier rubyid_summoner'>summoner</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span></code></pre>
1197
+
1198
+ </div>
1199
+ <p class="tag_title">Parameters:</p>
1200
+ <ul class="param">
1201
+
1202
+ <li>
1203
+
1204
+ <span class='name'>options</span>
1205
+
1206
+
1207
+ <span class='type'>(<tt>Hash</tt>)</span>
1208
+
1209
+
1210
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1211
+
1212
+
1213
+ &mdash;
1214
+ <div class='inline'><p>The options and filters to find the mastery info</p>
1215
+ </div>
1216
+
1217
+ </li>
1218
+
1219
+ </ul>
1220
+
1221
+
1222
+
1223
+
1224
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
1225
+ <ul class="option">
1226
+
1227
+ <li>
1228
+ <span class="name">:region</span>
1229
+ <span class="type">(<tt>String</tt>)</span>
1230
+ <span class="default">
1231
+
1232
+ </span>
1233
+
1234
+ &mdash; <div class='inline'><p>The League of Legends region associated with the account (e.g. +:br+, +:na+, etc)</p>
1235
+ </div>
1236
+
1237
+ </li>
1238
+
1239
+ <li>
1240
+ <span class="name">:summoner_id</span>
1241
+ <span class="type">(<tt>String</tt>)</span>
1242
+ <span class="default">
1243
+
1244
+ </span>
1245
+
1246
+ &mdash; <div class='inline'><p>The encrypted summoner ID</p>
1247
+ </div>
1248
+
1249
+ </li>
1250
+
1251
+ </ul>
1252
+
1253
+
1254
+ <p class="tag_title">Returns:</p>
1255
+ <ul class="return">
1256
+
1257
+ <li>
1258
+
1259
+
1260
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="" title="RiotAPI::ChampionMastery (class)">RiotAPI::ChampionMastery</a></span>&gt;</tt>)</span>
1261
+
1262
+
1263
+
1264
+ &mdash;
1265
+ <div class='inline'><p>A list of mastery info for each champion</p>
1266
+ </div>
1267
+
1268
+ </li>
1269
+
1270
+ </ul>
1271
+
1272
+ </div><table class="source_code">
1273
+ <tr>
1274
+ <td>
1275
+ <pre class="lines">
1276
+
1277
+
1278
+ 56
1279
+ 57
1280
+ 58
1281
+ 59
1282
+ 60
1283
+ 61
1284
+ 62
1285
+ 63
1286
+ 64
1287
+ 65</pre>
1288
+ </td>
1289
+ <td>
1290
+ <pre class="code"><span class="info file"># File 'lib/riot_api/resources/champion_mastery.rb', line 56</span>
1291
+
1292
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1293
+ <span class='id identifier rubyid_mandatory_options'>mandatory_options</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:region</span><span class='comma'>,</span> <span class='symbol'>:summoner_id</span><span class='rbracket'>]</span>
1294
+ <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_mandatory_options'>mandatory_options</span> <span class='op'>-</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1295
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A required parameter was not informed. The required paramaters are </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mandatory_options'>mandatory_options</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1296
+ <span class='kw'>end</span>
1297
+
1298
+ <span class='id identifier rubyid_request_url'>request_url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/lol/champion-mastery/v4/champion-masteries/by-summoner/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:summoner_id</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1299
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../RiotAPI.html" title="RiotAPI (module)">RiotAPI</a></span></span><span class='period'>.</span><span class='id identifier rubyid_client'><span class='object_link'><a href="../RiotAPI.html#client-class_method" title="RiotAPI.client (method)">client</a></span></span><span class='period'>.</span><span class='id identifier rubyid_request'><span class='object_link'><a href="Client.html#request-instance_method" title="RiotAPI::Client#request (method)">request</a></span></span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='comma'>,</span> <span class='id identifier rubyid_request_url'>request_url</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:region</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1300
+ <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_raw'>raw</span><span class='op'>|</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_raw'>raw</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1301
+ <span class='kw'>end</span></pre>
1302
+ </td>
1303
+ </tr>
1304
+ </table>
1305
+ </div>
1306
+
1307
+ </div>
1308
+
1309
+ </div>
1310
+
1311
+ <div id="footer">
1312
+ Generated on Mon Apr 1 18:45:17 2019 by
1313
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1314
+ 0.9.18 (ruby-2.6.2).
1315
+ </div>
1316
+
1317
+ </div>
1318
+ </body>
1319
+ </html>