dashboard-api 1.0.0 → 1.0.1

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +34 -0
  3. data/.gitignore +5 -4
  4. data/.travis.yml +20 -0
  5. data/Gemfile +9 -5
  6. data/Gemfile.lock +63 -31
  7. data/README.md +134 -138
  8. data/Rakefile +9 -7
  9. data/dashboard-api.gemspec +28 -28
  10. data/doc/Admins.html +603 -603
  11. data/doc/Clients.html +276 -276
  12. data/doc/DashboardAPI.html +603 -603
  13. data/doc/DashboardAPIVersion.html +159 -159
  14. data/doc/Devices.html +879 -879
  15. data/doc/Networks.html +1382 -1382
  16. data/doc/Organizations.html +1477 -1477
  17. data/doc/Phones.html +641 -641
  18. data/doc/SAML.html +758 -758
  19. data/doc/SSIDs.html +523 -523
  20. data/doc/Switchports.html +526 -526
  21. data/doc/Templates.html +378 -378
  22. data/doc/VLANs.html +762 -762
  23. data/doc/_index.html +235 -235
  24. data/doc/class_list.html +51 -51
  25. data/doc/css/full_list.css +58 -58
  26. data/doc/css/style.css +481 -481
  27. data/doc/file.README.html +248 -248
  28. data/doc/file_list.html +56 -56
  29. data/doc/frames.html +17 -17
  30. data/doc/index.html +248 -248
  31. data/doc/js/app.js +243 -243
  32. data/doc/js/full_list.js +216 -216
  33. data/doc/js/jquery.js +3 -3
  34. data/doc/method_list.html +523 -523
  35. data/doc/top-level-namespace.html +113 -113
  36. data/lib/admins.rb +37 -37
  37. data/lib/clients.rb +12 -12
  38. data/lib/dashboard-api.rb +82 -83
  39. data/lib/dashboard-api/version.rb +6 -6
  40. data/lib/devices.rb +57 -57
  41. data/lib/networks.rb +108 -108
  42. data/lib/organizations.rb +110 -115
  43. data/lib/phones.rb +40 -40
  44. data/lib/saml.rb +47 -47
  45. data/lib/ssids.rb +33 -33
  46. data/lib/switchports.rb +33 -33
  47. data/lib/templates.rb +18 -18
  48. data/lib/vlans.rb +49 -49
  49. metadata +7 -5
@@ -1,160 +1,160 @@
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: DashboardAPIVersion
8
-
9
- &mdash; Documentation by YARD 0.9.5
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 = "DashboardAPIVersion";
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"></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 (D)</a> &raquo;
40
-
41
-
42
- <span class="title">DashboardAPIVersion</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
- <iframe id="search_frame" src="class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Module: DashboardAPIVersion
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Included in:</dt>
81
- <dd><span class='object_link'><a href="DashboardAPI.html" title="DashboardAPI (class)">DashboardAPI</a></span></dd>
82
- </dl>
83
-
84
-
85
-
86
- <dl>
87
- <dt>Defined in:</dt>
88
- <dd>lib/dashboard-api/version.rb</dd>
89
- </dl>
90
-
91
- </div>
92
-
93
- <h2>Overview</h2><div class="docstring">
94
- <div class="discussion">
95
-
96
- <p>Version number of the Gem build</p>
97
-
98
-
99
- </div>
100
- </div>
101
- <div class="tags">
102
-
103
- <p class="tag_title">Author:</p>
104
- <ul class="author">
105
-
106
- <li>
107
-
108
-
109
-
110
-
111
-
112
- <div class='inline'>
113
- <p>Joe Letizia</p>
114
- </div>
115
-
116
- </li>
117
-
118
- </ul>
119
-
120
- </div>
121
- <h2>Constant Summary</h2>
122
- <dl class="constants">
123
-
124
- <dt id="VERSION-constant" class="">VERSION =
125
- <div class="docstring">
126
- <div class="discussion">
127
-
128
- <p>Current version number of the gem</p>
129
-
130
-
131
- </div>
132
- </div>
133
- <div class="tags">
134
-
135
-
136
- </div>
137
- </dt>
138
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
139
-
140
- </dl>
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
- </div>
151
-
152
- <div id="footer">
153
- Generated on Thu Nov 17 22:15:39 2016 by
154
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
- 0.9.5 (ruby-2.3.0).
156
- </div>
157
-
158
- </div>
159
- </body>
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: DashboardAPIVersion
8
+
9
+ &mdash; Documentation by YARD 0.9.5
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 = "DashboardAPIVersion";
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"></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 (D)</a> &raquo;
40
+
41
+
42
+ <span class="title">DashboardAPIVersion</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
+ <iframe id="search_frame" src="class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Module: DashboardAPIVersion
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Included in:</dt>
81
+ <dd><span class='object_link'><a href="DashboardAPI.html" title="DashboardAPI (class)">DashboardAPI</a></span></dd>
82
+ </dl>
83
+
84
+
85
+
86
+ <dl>
87
+ <dt>Defined in:</dt>
88
+ <dd>lib/dashboard-api/version.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+ <h2>Overview</h2><div class="docstring">
94
+ <div class="discussion">
95
+
96
+ <p>Version number of the Gem build</p>
97
+
98
+
99
+ </div>
100
+ </div>
101
+ <div class="tags">
102
+
103
+ <p class="tag_title">Author:</p>
104
+ <ul class="author">
105
+
106
+ <li>
107
+
108
+
109
+
110
+
111
+
112
+ <div class='inline'>
113
+ <p>Joe Letizia</p>
114
+ </div>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+
120
+ </div>
121
+ <h2>Constant Summary</h2>
122
+ <dl class="constants">
123
+
124
+ <dt id="VERSION-constant" class="">VERSION =
125
+ <div class="docstring">
126
+ <div class="discussion">
127
+
128
+ <p>Current version number of the gem</p>
129
+
130
+
131
+ </div>
132
+ </div>
133
+ <div class="tags">
134
+
135
+
136
+ </div>
137
+ </dt>
138
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
139
+
140
+ </dl>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ </div>
151
+
152
+ <div id="footer">
153
+ Generated on Thu Nov 17 22:15:39 2016 by
154
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
+ 0.9.5 (ruby-2.3.0).
156
+ </div>
157
+
158
+ </div>
159
+ </body>
160
160
  </html>
@@ -1,880 +1,880 @@
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: Devices
8
-
9
- &mdash; Documentation by YARD 0.9.5
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 = "Devices";
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"></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 (D)</a> &raquo;
40
-
41
-
42
- <span class="title">Devices</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
- <iframe id="search_frame" src="class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Module: Devices
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Included in:</dt>
81
- <dd><span class='object_link'><a href="DashboardAPI.html" title="DashboardAPI (class)">DashboardAPI</a></span></dd>
82
- </dl>
83
-
84
-
85
-
86
- <dl>
87
- <dt>Defined in:</dt>
88
- <dd>lib/devices.rb</dd>
89
- </dl>
90
-
91
- </div>
92
-
93
- <h2>Overview</h2><div class="docstring">
94
- <div class="discussion">
95
-
96
- <p>Devices section of the Meraki Dashboard API</p>
97
-
98
-
99
- </div>
100
- </div>
101
- <div class="tags">
102
-
103
- <p class="tag_title">Author:</p>
104
- <ul class="author">
105
-
106
- <li>
107
-
108
-
109
-
110
-
111
-
112
- <div class='inline'>
113
- <p>Joe Letizia</p>
114
- </div>
115
-
116
- </li>
117
-
118
- </ul>
119
-
120
- </div>
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
- <h2>
129
- Instance Method Summary
130
- <small><a href="#" class="summary_toggle">collapse</a></small>
131
- </h2>
132
-
133
- <ul class="summary">
134
-
135
- <li class="public ">
136
- <span class="summary_signature">
137
-
138
- <a href="#claim_device_into_network-instance_method" title="#claim_device_into_network (instance method)">#<strong>claim_device_into_network</strong>(network_id, options) &#x21d2; Integer </a>
139
-
140
-
141
-
142
- </span>
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
- <span class="summary_desc"><div class='inline'>
153
- <p>Claim a single device into a network.</p>
154
- </div></span>
155
-
156
- </li>
157
-
158
-
159
- <li class="public ">
160
- <span class="summary_signature">
161
-
162
- <a href="#get_device_uplink_stats-instance_method" title="#get_device_uplink_stats (instance method)">#<strong>get_device_uplink_stats</strong>(network_id, device_serial) &#x21d2; Array </a>
163
-
164
-
165
-
166
- </span>
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
- <span class="summary_desc"><div class='inline'>
177
- <p>Uplink information for a specified device.</p>
178
- </div></span>
179
-
180
- </li>
181
-
182
-
183
- <li class="public ">
184
- <span class="summary_signature">
185
-
186
- <a href="#get_single_device-instance_method" title="#get_single_device (instance method)">#<strong>get_single_device</strong>(network_id, device_serial) &#x21d2; Hash </a>
187
-
188
-
189
-
190
- </span>
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
- <span class="summary_desc"><div class='inline'>
201
- <p>Device information for a specified device.</p>
202
- </div></span>
203
-
204
- </li>
205
-
206
-
207
- <li class="public ">
208
- <span class="summary_signature">
209
-
210
- <a href="#list_devices_in_network-instance_method" title="#list_devices_in_network (instance method)">#<strong>list_devices_in_network</strong>(network_id) &#x21d2; Array </a>
211
-
212
-
213
-
214
- </span>
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
- <span class="summary_desc"><div class='inline'>
225
- <p>List all devices in a given network.</p>
226
- </div></span>
227
-
228
- </li>
229
-
230
-
231
- <li class="public ">
232
- <span class="summary_signature">
233
-
234
- <a href="#remove_device_from_network-instance_method" title="#remove_device_from_network (instance method)">#<strong>remove_device_from_network</strong>(network_id, device_serial) &#x21d2; Integer </a>
235
-
236
-
237
-
238
- </span>
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
- <span class="summary_desc"><div class='inline'>
249
- <p>Remove a single device from a network.</p>
250
- </div></span>
251
-
252
- </li>
253
-
254
-
255
- <li class="public ">
256
- <span class="summary_signature">
257
-
258
- <a href="#update_device_attributes-instance_method" title="#update_device_attributes (instance method)">#<strong>update_device_attributes</strong>(network_id, device_serial, options) &#x21d2; Hash </a>
259
-
260
-
261
-
262
- </span>
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
- <span class="summary_desc"><div class='inline'>
273
- <p>Update a single devices attributes.</p>
274
- </div></span>
275
-
276
- </li>
277
-
278
-
279
- </ul>
280
-
281
-
282
-
283
-
284
- <div id="instance_method_details" class="method_details_list">
285
- <h2>Instance Method Details</h2>
286
-
287
-
288
- <div class="method_details first">
289
- <h3 class="signature first" id="claim_device_into_network-instance_method">
290
-
291
- #<strong>claim_device_into_network</strong>(network_id, options) &#x21d2; <tt>Integer</tt>
292
-
293
-
294
-
295
-
296
-
297
- </h3><div class="docstring">
298
- <div class="discussion">
299
-
300
- <p>Claim a single device into a network</p>
301
-
302
-
303
- </div>
304
- </div>
305
- <div class="tags">
306
- <p class="tag_title">Parameters:</p>
307
- <ul class="param">
308
-
309
- <li>
310
-
311
- <span class='name'>network_id</span>
312
-
313
-
314
- <span class='type'>(<tt>String</tt>)</span>
315
-
316
-
317
-
318
- &mdash;
319
- <div class='inline'>
320
- <p>dashboard network id to claim device into</p>
321
- </div>
322
-
323
- </li>
324
-
325
- <li>
326
-
327
- <span class='name'>options</span>
328
-
329
-
330
- <span class='type'>(<tt>Hash</tt>)</span>
331
-
332
-
333
-
334
- &mdash;
335
- <div class='inline'>
336
- <p>hash containing :serial =&gt; &#39;meraki device SN&#39; you want to claim</p>
337
- </div>
338
-
339
- </li>
340
-
341
- </ul>
342
-
343
- <p class="tag_title">Returns:</p>
344
- <ul class="return">
345
-
346
- <li>
347
-
348
-
349
- <span class='type'>(<tt>Integer</tt>)</span>
350
-
351
-
352
-
353
- &mdash;
354
- <div class='inline'>
355
- <p>code returns the HTTP code of the API call</p>
356
- </div>
357
-
358
- </li>
359
-
360
- </ul>
361
-
362
- </div><table class="source_code">
363
- <tr>
364
- <td>
365
- <pre class="lines">
366
-
367
-
368
- 44
369
- 45
370
- 46
371
- 47
372
- 48</pre>
373
- </td>
374
- <td>
375
- <pre class="code"><span class="info file"># File 'lib/devices.rb', line 44</span>
376
-
377
- <span class='kw'>def</span> <span class='id identifier rubyid_claim_device_into_network'>claim_device_into_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
378
- <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Options were not passed as a Hash</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
379
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:body</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_options'>options</span><span class='rbrace'>}</span>
380
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/claim</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>POST</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
381
- <span class='kw'>end</span></pre>
382
- </td>
383
- </tr>
384
- </table>
385
- </div>
386
-
387
- <div class="method_details ">
388
- <h3 class="signature " id="get_device_uplink_stats-instance_method">
389
-
390
- #<strong>get_device_uplink_stats</strong>(network_id, device_serial) &#x21d2; <tt>Array</tt>
391
-
392
-
393
-
394
-
395
-
396
- </h3><div class="docstring">
397
- <div class="discussion">
398
-
399
- <p>Uplink information for a specified device</p>
400
-
401
-
402
- </div>
403
- </div>
404
- <div class="tags">
405
- <p class="tag_title">Parameters:</p>
406
- <ul class="param">
407
-
408
- <li>
409
-
410
- <span class='name'>network_id</span>
411
-
412
-
413
- <span class='type'>(<tt>String</tt>)</span>
414
-
415
-
416
-
417
- &mdash;
418
- <div class='inline'>
419
- <p>network id where the device exists</p>
420
- </div>
421
-
422
- </li>
423
-
424
- <li>
425
-
426
- <span class='name'>device_serial</span>
427
-
428
-
429
- <span class='type'>(<tt>String</tt>)</span>
430
-
431
-
432
-
433
- &mdash;
434
- <div class='inline'>
435
- <p>meraki serial number of the device you want to check</p>
436
- </div>
437
-
438
- </li>
439
-
440
- </ul>
441
-
442
- <p class="tag_title">Returns:</p>
443
- <ul class="return">
444
-
445
- <li>
446
-
447
-
448
- <span class='type'>(<tt>Array</tt>)</span>
449
-
450
-
451
-
452
- &mdash;
453
- <div class='inline'>
454
- <p>an array of hashes for each uplink and it&#39;s attributes</p>
455
- </div>
456
-
457
- </li>
458
-
459
- </ul>
460
-
461
- </div><table class="source_code">
462
- <tr>
463
- <td>
464
- <pre class="lines">
465
-
466
-
467
- 24
468
- 25
469
- 26</pre>
470
- </td>
471
- <td>
472
- <pre class="code"><span class="info file"># File 'lib/devices.rb', line 24</span>
473
-
474
- <span class='kw'>def</span> <span class='id identifier rubyid_get_device_uplink_stats'>get_device_uplink_stats</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
475
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/uplink</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
476
- <span class='kw'>end</span></pre>
477
- </td>
478
- </tr>
479
- </table>
480
- </div>
481
-
482
- <div class="method_details ">
483
- <h3 class="signature " id="get_single_device-instance_method">
484
-
485
- #<strong>get_single_device</strong>(network_id, device_serial) &#x21d2; <tt>Hash</tt>
486
-
487
-
488
-
489
-
490
-
491
- </h3><div class="docstring">
492
- <div class="discussion">
493
-
494
- <p>Device information for a specified device</p>
495
-
496
-
497
- </div>
498
- </div>
499
- <div class="tags">
500
- <p class="tag_title">Parameters:</p>
501
- <ul class="param">
502
-
503
- <li>
504
-
505
- <span class='name'>network_id</span>
506
-
507
-
508
- <span class='type'>(<tt>String</tt>)</span>
509
-
510
-
511
-
512
- &mdash;
513
- <div class='inline'>
514
- <p>the network id where the device exists</p>
515
- </div>
516
-
517
- </li>
518
-
519
- <li>
520
-
521
- <span class='name'>device_serial</span>
522
-
523
-
524
- <span class='type'>(<tt>String</tt>)</span>
525
-
526
-
527
-
528
- &mdash;
529
- <div class='inline'>
530
- <p>the meraki serial number of the device you want to get information for</p>
531
- </div>
532
-
533
- </li>
534
-
535
- </ul>
536
-
537
- <p class="tag_title">Returns:</p>
538
- <ul class="return">
539
-
540
- <li>
541
-
542
-
543
- <span class='type'>(<tt>Hash</tt>)</span>
544
-
545
-
546
-
547
- &mdash;
548
- <div class='inline'>
549
- <p>a hash containing all of the devices attributes</p>
550
- </div>
551
-
552
- </li>
553
-
554
- </ul>
555
-
556
- </div><table class="source_code">
557
- <tr>
558
- <td>
559
- <pre class="lines">
560
-
561
-
562
- 16
563
- 17
564
- 18</pre>
565
- </td>
566
- <td>
567
- <pre class="code"><span class="info file"># File 'lib/devices.rb', line 16</span>
568
-
569
- <span class='kw'>def</span> <span class='id identifier rubyid_get_single_device'>get_single_device</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
570
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
571
- <span class='kw'>end</span></pre>
572
- </td>
573
- </tr>
574
- </table>
575
- </div>
576
-
577
- <div class="method_details ">
578
- <h3 class="signature " id="list_devices_in_network-instance_method">
579
-
580
- #<strong>list_devices_in_network</strong>(network_id) &#x21d2; <tt>Array</tt>
581
-
582
-
583
-
584
-
585
-
586
- </h3><div class="docstring">
587
- <div class="discussion">
588
-
589
- <p>List all devices in a given network</p>
590
-
591
-
592
- </div>
593
- </div>
594
- <div class="tags">
595
- <p class="tag_title">Parameters:</p>
596
- <ul class="param">
597
-
598
- <li>
599
-
600
- <span class='name'>network_id</span>
601
-
602
-
603
- <span class='type'>(<tt>String</tt>)</span>
604
-
605
-
606
-
607
- &mdash;
608
- <div class='inline'>
609
- <p>network that you want to get devices for</p>
610
- </div>
611
-
612
- </li>
613
-
614
- </ul>
615
-
616
- <p class="tag_title">Returns:</p>
617
- <ul class="return">
618
-
619
- <li>
620
-
621
-
622
- <span class='type'>(<tt>Array</tt>)</span>
623
-
624
-
625
-
626
- &mdash;
627
- <div class='inline'>
628
- <p>array of hashes containing device information for all devices in the
629
- network</p>
630
- </div>
631
-
632
- </li>
633
-
634
- </ul>
635
-
636
- </div><table class="source_code">
637
- <tr>
638
- <td>
639
- <pre class="lines">
640
-
641
-
642
- 7
643
- 8
644
- 9</pre>
645
- </td>
646
- <td>
647
- <pre class="code"><span class="info file"># File 'lib/devices.rb', line 7</span>
648
-
649
- <span class='kw'>def</span> <span class='id identifier rubyid_list_devices_in_network'>list_devices_in_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
650
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
651
- <span class='kw'>end</span></pre>
652
- </td>
653
- </tr>
654
- </table>
655
- </div>
656
-
657
- <div class="method_details ">
658
- <h3 class="signature " id="remove_device_from_network-instance_method">
659
-
660
- #<strong>remove_device_from_network</strong>(network_id, device_serial) &#x21d2; <tt>Integer</tt>
661
-
662
-
663
-
664
-
665
-
666
- </h3><div class="docstring">
667
- <div class="discussion">
668
-
669
- <p>Remove a single device from a network</p>
670
-
671
-
672
- </div>
673
- </div>
674
- <div class="tags">
675
- <p class="tag_title">Parameters:</p>
676
- <ul class="param">
677
-
678
- <li>
679
-
680
- <span class='name'>network_id</span>
681
-
682
-
683
- <span class='type'>(<tt>String</tt>)</span>
684
-
685
-
686
-
687
- &mdash;
688
- <div class='inline'>
689
- <p>dashboard network id to remove device from</p>
690
- </div>
691
-
692
- </li>
693
-
694
- <li>
695
-
696
- <span class='name'>device_serial</span>
697
-
698
-
699
- <span class='type'>(<tt>String</tt>)</span>
700
-
701
-
702
-
703
- &mdash;
704
- <div class='inline'>
705
- <p>meraki serial number for device to remove</p>
706
- </div>
707
-
708
- </li>
709
-
710
- </ul>
711
-
712
- <p class="tag_title">Returns:</p>
713
- <ul class="return">
714
-
715
- <li>
716
-
717
-
718
- <span class='type'>(<tt>Integer</tt>)</span>
719
-
720
-
721
-
722
- &mdash;
723
- <div class='inline'>
724
- <p>http_code HTTP code for API call</p>
725
- </div>
726
-
727
- </li>
728
-
729
- </ul>
730
-
731
- </div><table class="source_code">
732
- <tr>
733
- <td>
734
- <pre class="lines">
735
-
736
-
737
- 54
738
- 55
739
- 56</pre>
740
- </td>
741
- <td>
742
- <pre class="code"><span class="info file"># File 'lib/devices.rb', line 54</span>
743
-
744
- <span class='kw'>def</span> <span class='id identifier rubyid_remove_device_from_network'>remove_device_from_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
745
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/remove</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>POST</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
746
- <span class='kw'>end</span></pre>
747
- </td>
748
- </tr>
749
- </table>
750
- </div>
751
-
752
- <div class="method_details ">
753
- <h3 class="signature " id="update_device_attributes-instance_method">
754
-
755
- #<strong>update_device_attributes</strong>(network_id, device_serial, options) &#x21d2; <tt>Hash</tt>
756
-
757
-
758
-
759
-
760
-
761
- </h3><div class="docstring">
762
- <div class="discussion">
763
-
764
- <p>Update a single devices attributes</p>
765
-
766
-
767
- </div>
768
- </div>
769
- <div class="tags">
770
- <p class="tag_title">Parameters:</p>
771
- <ul class="param">
772
-
773
- <li>
774
-
775
- <span class='name'>network_id</span>
776
-
777
-
778
- <span class='type'>(<tt>String</tt>)</span>
779
-
780
-
781
-
782
- &mdash;
783
- <div class='inline'>
784
- <p>dashboard network id where the device exists</p>
785
- </div>
786
-
787
- </li>
788
-
789
- <li>
790
-
791
- <span class='name'>device_serial</span>
792
-
793
-
794
- <span class='type'>(<tt>String</tt>)</span>
795
-
796
-
797
-
798
- &mdash;
799
- <div class='inline'>
800
- <p>meraki serial number of the device you want to modify</p>
801
- </div>
802
-
803
- </li>
804
-
805
- <li>
806
-
807
- <span class='name'>options</span>
808
-
809
-
810
- <span class='type'>(<tt>Hash</tt>)</span>
811
-
812
-
813
-
814
- &mdash;
815
- <div class='inline'>
816
- <p>hash containing the attributes you want to modify. such as name, tags,
817
- longitude, latitude. A full list is found on the official Meraki API Docs</p>
818
- </div>
819
-
820
- </li>
821
-
822
- </ul>
823
-
824
- <p class="tag_title">Returns:</p>
825
- <ul class="return">
826
-
827
- <li>
828
-
829
-
830
- <span class='type'>(<tt>Hash</tt>)</span>
831
-
832
-
833
-
834
- &mdash;
835
- <div class='inline'>
836
- <p>a hash containing the devices new attribute set</p>
837
- </div>
838
-
839
- </li>
840
-
841
- </ul>
842
-
843
- </div><table class="source_code">
844
- <tr>
845
- <td>
846
- <pre class="lines">
847
-
848
-
849
- 34
850
- 35
851
- 36
852
- 37
853
- 38</pre>
854
- </td>
855
- <td>
856
- <pre class="code"><span class="info file"># File 'lib/devices.rb', line 34</span>
857
-
858
- <span class='kw'>def</span> <span class='id identifier rubyid_update_device_attributes'>update_device_attributes</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
859
- <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Options were not passed as a Hash</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
860
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:body</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_options'>options</span><span class='rbrace'>}</span>
861
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>PUT</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
862
- <span class='kw'>end</span></pre>
863
- </td>
864
- </tr>
865
- </table>
866
- </div>
867
-
868
- </div>
869
-
870
- </div>
871
-
872
- <div id="footer">
873
- Generated on Thu Nov 17 22:15:39 2016 by
874
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
875
- 0.9.5 (ruby-2.3.0).
876
- </div>
877
-
878
- </div>
879
- </body>
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: Devices
8
+
9
+ &mdash; Documentation by YARD 0.9.5
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 = "Devices";
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"></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 (D)</a> &raquo;
40
+
41
+
42
+ <span class="title">Devices</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
+ <iframe id="search_frame" src="class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Module: Devices
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Included in:</dt>
81
+ <dd><span class='object_link'><a href="DashboardAPI.html" title="DashboardAPI (class)">DashboardAPI</a></span></dd>
82
+ </dl>
83
+
84
+
85
+
86
+ <dl>
87
+ <dt>Defined in:</dt>
88
+ <dd>lib/devices.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+ <h2>Overview</h2><div class="docstring">
94
+ <div class="discussion">
95
+
96
+ <p>Devices section of the Meraki Dashboard API</p>
97
+
98
+
99
+ </div>
100
+ </div>
101
+ <div class="tags">
102
+
103
+ <p class="tag_title">Author:</p>
104
+ <ul class="author">
105
+
106
+ <li>
107
+
108
+
109
+
110
+
111
+
112
+ <div class='inline'>
113
+ <p>Joe Letizia</p>
114
+ </div>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+
120
+ </div>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <h2>
129
+ Instance Method Summary
130
+ <small><a href="#" class="summary_toggle">collapse</a></small>
131
+ </h2>
132
+
133
+ <ul class="summary">
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#claim_device_into_network-instance_method" title="#claim_device_into_network (instance method)">#<strong>claim_device_into_network</strong>(network_id, options) &#x21d2; Integer </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'>
153
+ <p>Claim a single device into a network.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#get_device_uplink_stats-instance_method" title="#get_device_uplink_stats (instance method)">#<strong>get_device_uplink_stats</strong>(network_id, device_serial) &#x21d2; Array </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'>
177
+ <p>Uplink information for a specified device.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#get_single_device-instance_method" title="#get_single_device (instance method)">#<strong>get_single_device</strong>(network_id, device_serial) &#x21d2; Hash </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>Device information for a specified device.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#list_devices_in_network-instance_method" title="#list_devices_in_network (instance method)">#<strong>list_devices_in_network</strong>(network_id) &#x21d2; Array </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'>
225
+ <p>List all devices in a given network.</p>
226
+ </div></span>
227
+
228
+ </li>
229
+
230
+
231
+ <li class="public ">
232
+ <span class="summary_signature">
233
+
234
+ <a href="#remove_device_from_network-instance_method" title="#remove_device_from_network (instance method)">#<strong>remove_device_from_network</strong>(network_id, device_serial) &#x21d2; Integer </a>
235
+
236
+
237
+
238
+ </span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'>
249
+ <p>Remove a single device from a network.</p>
250
+ </div></span>
251
+
252
+ </li>
253
+
254
+
255
+ <li class="public ">
256
+ <span class="summary_signature">
257
+
258
+ <a href="#update_device_attributes-instance_method" title="#update_device_attributes (instance method)">#<strong>update_device_attributes</strong>(network_id, device_serial, options) &#x21d2; Hash </a>
259
+
260
+
261
+
262
+ </span>
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+ <span class="summary_desc"><div class='inline'>
273
+ <p>Update a single devices attributes.</p>
274
+ </div></span>
275
+
276
+ </li>
277
+
278
+
279
+ </ul>
280
+
281
+
282
+
283
+
284
+ <div id="instance_method_details" class="method_details_list">
285
+ <h2>Instance Method Details</h2>
286
+
287
+
288
+ <div class="method_details first">
289
+ <h3 class="signature first" id="claim_device_into_network-instance_method">
290
+
291
+ #<strong>claim_device_into_network</strong>(network_id, options) &#x21d2; <tt>Integer</tt>
292
+
293
+
294
+
295
+
296
+
297
+ </h3><div class="docstring">
298
+ <div class="discussion">
299
+
300
+ <p>Claim a single device into a network</p>
301
+
302
+
303
+ </div>
304
+ </div>
305
+ <div class="tags">
306
+ <p class="tag_title">Parameters:</p>
307
+ <ul class="param">
308
+
309
+ <li>
310
+
311
+ <span class='name'>network_id</span>
312
+
313
+
314
+ <span class='type'>(<tt>String</tt>)</span>
315
+
316
+
317
+
318
+ &mdash;
319
+ <div class='inline'>
320
+ <p>dashboard network id to claim device into</p>
321
+ </div>
322
+
323
+ </li>
324
+
325
+ <li>
326
+
327
+ <span class='name'>options</span>
328
+
329
+
330
+ <span class='type'>(<tt>Hash</tt>)</span>
331
+
332
+
333
+
334
+ &mdash;
335
+ <div class='inline'>
336
+ <p>hash containing :serial =&gt; &#39;meraki device SN&#39; you want to claim</p>
337
+ </div>
338
+
339
+ </li>
340
+
341
+ </ul>
342
+
343
+ <p class="tag_title">Returns:</p>
344
+ <ul class="return">
345
+
346
+ <li>
347
+
348
+
349
+ <span class='type'>(<tt>Integer</tt>)</span>
350
+
351
+
352
+
353
+ &mdash;
354
+ <div class='inline'>
355
+ <p>code returns the HTTP code of the API call</p>
356
+ </div>
357
+
358
+ </li>
359
+
360
+ </ul>
361
+
362
+ </div><table class="source_code">
363
+ <tr>
364
+ <td>
365
+ <pre class="lines">
366
+
367
+
368
+ 44
369
+ 45
370
+ 46
371
+ 47
372
+ 48</pre>
373
+ </td>
374
+ <td>
375
+ <pre class="code"><span class="info file"># File 'lib/devices.rb', line 44</span>
376
+
377
+ <span class='kw'>def</span> <span class='id identifier rubyid_claim_device_into_network'>claim_device_into_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
378
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Options were not passed as a Hash</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
379
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:body</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_options'>options</span><span class='rbrace'>}</span>
380
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/claim</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>POST</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
381
+ <span class='kw'>end</span></pre>
382
+ </td>
383
+ </tr>
384
+ </table>
385
+ </div>
386
+
387
+ <div class="method_details ">
388
+ <h3 class="signature " id="get_device_uplink_stats-instance_method">
389
+
390
+ #<strong>get_device_uplink_stats</strong>(network_id, device_serial) &#x21d2; <tt>Array</tt>
391
+
392
+
393
+
394
+
395
+
396
+ </h3><div class="docstring">
397
+ <div class="discussion">
398
+
399
+ <p>Uplink information for a specified device</p>
400
+
401
+
402
+ </div>
403
+ </div>
404
+ <div class="tags">
405
+ <p class="tag_title">Parameters:</p>
406
+ <ul class="param">
407
+
408
+ <li>
409
+
410
+ <span class='name'>network_id</span>
411
+
412
+
413
+ <span class='type'>(<tt>String</tt>)</span>
414
+
415
+
416
+
417
+ &mdash;
418
+ <div class='inline'>
419
+ <p>network id where the device exists</p>
420
+ </div>
421
+
422
+ </li>
423
+
424
+ <li>
425
+
426
+ <span class='name'>device_serial</span>
427
+
428
+
429
+ <span class='type'>(<tt>String</tt>)</span>
430
+
431
+
432
+
433
+ &mdash;
434
+ <div class='inline'>
435
+ <p>meraki serial number of the device you want to check</p>
436
+ </div>
437
+
438
+ </li>
439
+
440
+ </ul>
441
+
442
+ <p class="tag_title">Returns:</p>
443
+ <ul class="return">
444
+
445
+ <li>
446
+
447
+
448
+ <span class='type'>(<tt>Array</tt>)</span>
449
+
450
+
451
+
452
+ &mdash;
453
+ <div class='inline'>
454
+ <p>an array of hashes for each uplink and it&#39;s attributes</p>
455
+ </div>
456
+
457
+ </li>
458
+
459
+ </ul>
460
+
461
+ </div><table class="source_code">
462
+ <tr>
463
+ <td>
464
+ <pre class="lines">
465
+
466
+
467
+ 24
468
+ 25
469
+ 26</pre>
470
+ </td>
471
+ <td>
472
+ <pre class="code"><span class="info file"># File 'lib/devices.rb', line 24</span>
473
+
474
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_device_uplink_stats'>get_device_uplink_stats</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
475
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/uplink</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
476
+ <span class='kw'>end</span></pre>
477
+ </td>
478
+ </tr>
479
+ </table>
480
+ </div>
481
+
482
+ <div class="method_details ">
483
+ <h3 class="signature " id="get_single_device-instance_method">
484
+
485
+ #<strong>get_single_device</strong>(network_id, device_serial) &#x21d2; <tt>Hash</tt>
486
+
487
+
488
+
489
+
490
+
491
+ </h3><div class="docstring">
492
+ <div class="discussion">
493
+
494
+ <p>Device information for a specified device</p>
495
+
496
+
497
+ </div>
498
+ </div>
499
+ <div class="tags">
500
+ <p class="tag_title">Parameters:</p>
501
+ <ul class="param">
502
+
503
+ <li>
504
+
505
+ <span class='name'>network_id</span>
506
+
507
+
508
+ <span class='type'>(<tt>String</tt>)</span>
509
+
510
+
511
+
512
+ &mdash;
513
+ <div class='inline'>
514
+ <p>the network id where the device exists</p>
515
+ </div>
516
+
517
+ </li>
518
+
519
+ <li>
520
+
521
+ <span class='name'>device_serial</span>
522
+
523
+
524
+ <span class='type'>(<tt>String</tt>)</span>
525
+
526
+
527
+
528
+ &mdash;
529
+ <div class='inline'>
530
+ <p>the meraki serial number of the device you want to get information for</p>
531
+ </div>
532
+
533
+ </li>
534
+
535
+ </ul>
536
+
537
+ <p class="tag_title">Returns:</p>
538
+ <ul class="return">
539
+
540
+ <li>
541
+
542
+
543
+ <span class='type'>(<tt>Hash</tt>)</span>
544
+
545
+
546
+
547
+ &mdash;
548
+ <div class='inline'>
549
+ <p>a hash containing all of the devices attributes</p>
550
+ </div>
551
+
552
+ </li>
553
+
554
+ </ul>
555
+
556
+ </div><table class="source_code">
557
+ <tr>
558
+ <td>
559
+ <pre class="lines">
560
+
561
+
562
+ 16
563
+ 17
564
+ 18</pre>
565
+ </td>
566
+ <td>
567
+ <pre class="code"><span class="info file"># File 'lib/devices.rb', line 16</span>
568
+
569
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_single_device'>get_single_device</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
570
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
571
+ <span class='kw'>end</span></pre>
572
+ </td>
573
+ </tr>
574
+ </table>
575
+ </div>
576
+
577
+ <div class="method_details ">
578
+ <h3 class="signature " id="list_devices_in_network-instance_method">
579
+
580
+ #<strong>list_devices_in_network</strong>(network_id) &#x21d2; <tt>Array</tt>
581
+
582
+
583
+
584
+
585
+
586
+ </h3><div class="docstring">
587
+ <div class="discussion">
588
+
589
+ <p>List all devices in a given network</p>
590
+
591
+
592
+ </div>
593
+ </div>
594
+ <div class="tags">
595
+ <p class="tag_title">Parameters:</p>
596
+ <ul class="param">
597
+
598
+ <li>
599
+
600
+ <span class='name'>network_id</span>
601
+
602
+
603
+ <span class='type'>(<tt>String</tt>)</span>
604
+
605
+
606
+
607
+ &mdash;
608
+ <div class='inline'>
609
+ <p>network that you want to get devices for</p>
610
+ </div>
611
+
612
+ </li>
613
+
614
+ </ul>
615
+
616
+ <p class="tag_title">Returns:</p>
617
+ <ul class="return">
618
+
619
+ <li>
620
+
621
+
622
+ <span class='type'>(<tt>Array</tt>)</span>
623
+
624
+
625
+
626
+ &mdash;
627
+ <div class='inline'>
628
+ <p>array of hashes containing device information for all devices in the
629
+ network</p>
630
+ </div>
631
+
632
+ </li>
633
+
634
+ </ul>
635
+
636
+ </div><table class="source_code">
637
+ <tr>
638
+ <td>
639
+ <pre class="lines">
640
+
641
+
642
+ 7
643
+ 8
644
+ 9</pre>
645
+ </td>
646
+ <td>
647
+ <pre class="code"><span class="info file"># File 'lib/devices.rb', line 7</span>
648
+
649
+ <span class='kw'>def</span> <span class='id identifier rubyid_list_devices_in_network'>list_devices_in_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
650
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GET</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
651
+ <span class='kw'>end</span></pre>
652
+ </td>
653
+ </tr>
654
+ </table>
655
+ </div>
656
+
657
+ <div class="method_details ">
658
+ <h3 class="signature " id="remove_device_from_network-instance_method">
659
+
660
+ #<strong>remove_device_from_network</strong>(network_id, device_serial) &#x21d2; <tt>Integer</tt>
661
+
662
+
663
+
664
+
665
+
666
+ </h3><div class="docstring">
667
+ <div class="discussion">
668
+
669
+ <p>Remove a single device from a network</p>
670
+
671
+
672
+ </div>
673
+ </div>
674
+ <div class="tags">
675
+ <p class="tag_title">Parameters:</p>
676
+ <ul class="param">
677
+
678
+ <li>
679
+
680
+ <span class='name'>network_id</span>
681
+
682
+
683
+ <span class='type'>(<tt>String</tt>)</span>
684
+
685
+
686
+
687
+ &mdash;
688
+ <div class='inline'>
689
+ <p>dashboard network id to remove device from</p>
690
+ </div>
691
+
692
+ </li>
693
+
694
+ <li>
695
+
696
+ <span class='name'>device_serial</span>
697
+
698
+
699
+ <span class='type'>(<tt>String</tt>)</span>
700
+
701
+
702
+
703
+ &mdash;
704
+ <div class='inline'>
705
+ <p>meraki serial number for device to remove</p>
706
+ </div>
707
+
708
+ </li>
709
+
710
+ </ul>
711
+
712
+ <p class="tag_title">Returns:</p>
713
+ <ul class="return">
714
+
715
+ <li>
716
+
717
+
718
+ <span class='type'>(<tt>Integer</tt>)</span>
719
+
720
+
721
+
722
+ &mdash;
723
+ <div class='inline'>
724
+ <p>http_code HTTP code for API call</p>
725
+ </div>
726
+
727
+ </li>
728
+
729
+ </ul>
730
+
731
+ </div><table class="source_code">
732
+ <tr>
733
+ <td>
734
+ <pre class="lines">
735
+
736
+
737
+ 54
738
+ 55
739
+ 56</pre>
740
+ </td>
741
+ <td>
742
+ <pre class="code"><span class="info file"># File 'lib/devices.rb', line 54</span>
743
+
744
+ <span class='kw'>def</span> <span class='id identifier rubyid_remove_device_from_network'>remove_device_from_network</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='rparen'>)</span>
745
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_content'>/remove</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>POST</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
746
+ <span class='kw'>end</span></pre>
747
+ </td>
748
+ </tr>
749
+ </table>
750
+ </div>
751
+
752
+ <div class="method_details ">
753
+ <h3 class="signature " id="update_device_attributes-instance_method">
754
+
755
+ #<strong>update_device_attributes</strong>(network_id, device_serial, options) &#x21d2; <tt>Hash</tt>
756
+
757
+
758
+
759
+
760
+
761
+ </h3><div class="docstring">
762
+ <div class="discussion">
763
+
764
+ <p>Update a single devices attributes</p>
765
+
766
+
767
+ </div>
768
+ </div>
769
+ <div class="tags">
770
+ <p class="tag_title">Parameters:</p>
771
+ <ul class="param">
772
+
773
+ <li>
774
+
775
+ <span class='name'>network_id</span>
776
+
777
+
778
+ <span class='type'>(<tt>String</tt>)</span>
779
+
780
+
781
+
782
+ &mdash;
783
+ <div class='inline'>
784
+ <p>dashboard network id where the device exists</p>
785
+ </div>
786
+
787
+ </li>
788
+
789
+ <li>
790
+
791
+ <span class='name'>device_serial</span>
792
+
793
+
794
+ <span class='type'>(<tt>String</tt>)</span>
795
+
796
+
797
+
798
+ &mdash;
799
+ <div class='inline'>
800
+ <p>meraki serial number of the device you want to modify</p>
801
+ </div>
802
+
803
+ </li>
804
+
805
+ <li>
806
+
807
+ <span class='name'>options</span>
808
+
809
+
810
+ <span class='type'>(<tt>Hash</tt>)</span>
811
+
812
+
813
+
814
+ &mdash;
815
+ <div class='inline'>
816
+ <p>hash containing the attributes you want to modify. such as name, tags,
817
+ longitude, latitude. A full list is found on the official Meraki API Docs</p>
818
+ </div>
819
+
820
+ </li>
821
+
822
+ </ul>
823
+
824
+ <p class="tag_title">Returns:</p>
825
+ <ul class="return">
826
+
827
+ <li>
828
+
829
+
830
+ <span class='type'>(<tt>Hash</tt>)</span>
831
+
832
+
833
+
834
+ &mdash;
835
+ <div class='inline'>
836
+ <p>a hash containing the devices new attribute set</p>
837
+ </div>
838
+
839
+ </li>
840
+
841
+ </ul>
842
+
843
+ </div><table class="source_code">
844
+ <tr>
845
+ <td>
846
+ <pre class="lines">
847
+
848
+
849
+ 34
850
+ 35
851
+ 36
852
+ 37
853
+ 38</pre>
854
+ </td>
855
+ <td>
856
+ <pre class="code"><span class="info file"># File 'lib/devices.rb', line 34</span>
857
+
858
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_device_attributes'>update_device_attributes</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_device_serial'>device_serial</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
859
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Options were not passed as a Hash</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
860
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:body</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_options'>options</span><span class='rbrace'>}</span>
861
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make_api_call'>make_api_call</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/networks/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_network_id'>network_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/devices/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_device_serial'>device_serial</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>PUT</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
862
+ <span class='kw'>end</span></pre>
863
+ </td>
864
+ </tr>
865
+ </table>
866
+ </div>
867
+
868
+ </div>
869
+
870
+ </div>
871
+
872
+ <div id="footer">
873
+ Generated on Thu Nov 17 22:15:39 2016 by
874
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
875
+ 0.9.5 (ruby-2.3.0).
876
+ </div>
877
+
878
+ </div>
879
+ </body>
880
880
  </html>