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,642 +1,642 @@
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: Phones
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 = "Phones";
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 (P)</a> &raquo;
40
-
41
-
42
- <span class="title">Phones</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: Phones
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/phones.rb</dd>
89
- </dl>
90
-
91
- </div>
92
-
93
- <h2>Overview</h2><div class="docstring">
94
- <div class="discussion">
95
-
96
- <p>Phones 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="#add_phone_contact-instance_method" title="#add_phone_contact (instance method)">#<strong>add_phone_contact</strong>(network_id, options) &#x21d2; Hash </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>Add a single phone contact.</p>
154
- </div></span>
155
-
156
- </li>
157
-
158
-
159
- <li class="public ">
160
- <span class="summary_signature">
161
-
162
- <a href="#delete_phone_contact-instance_method" title="#delete_phone_contact (instance method)">#<strong>delete_phone_contact</strong>(network_id, contact_id) &#x21d2; Integer </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>Delete a single phone contact.</p>
178
- </div></span>
179
-
180
- </li>
181
-
182
-
183
- <li class="public ">
184
- <span class="summary_signature">
185
-
186
- <a href="#list_phone_contacts-instance_method" title="#list_phone_contacts (instance method)">#<strong>list_phone_contacts</strong>(network_id) &#x21d2; Array </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>Get list of phone contacts.</p>
202
- </div></span>
203
-
204
- </li>
205
-
206
-
207
- <li class="public ">
208
- <span class="summary_signature">
209
-
210
- <a href="#update_phone_contact-instance_method" title="#update_phone_contact (instance method)">#<strong>update_phone_contact</strong>(network_id, contact_id, options) &#x21d2; Hash </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>Update a single phone contact.</p>
226
- </div></span>
227
-
228
- </li>
229
-
230
-
231
- </ul>
232
-
233
-
234
-
235
-
236
- <div id="instance_method_details" class="method_details_list">
237
- <h2>Instance Method Details</h2>
238
-
239
-
240
- <div class="method_details first">
241
- <h3 class="signature first" id="add_phone_contact-instance_method">
242
-
243
- #<strong>add_phone_contact</strong>(network_id, options) &#x21d2; <tt>Hash</tt>
244
-
245
-
246
-
247
-
248
-
249
- </h3><div class="docstring">
250
- <div class="discussion">
251
-
252
- <p>Add a single phone contact</p>
253
-
254
-
255
- </div>
256
- </div>
257
- <div class="tags">
258
- <p class="tag_title">Parameters:</p>
259
- <ul class="param">
260
-
261
- <li>
262
-
263
- <span class='name'>network_id</span>
264
-
265
-
266
- <span class='type'>(<tt>String</tt>)</span>
267
-
268
-
269
-
270
- &mdash;
271
- <div class='inline'>
272
- <p>the network id you want to add the contact to</p>
273
- </div>
274
-
275
- </li>
276
-
277
- <li>
278
-
279
- <span class='name'>options</span>
280
-
281
-
282
- <span class='type'>(<tt>Hash</tt>)</span>
283
-
284
-
285
-
286
- &mdash;
287
- <div class='inline'>
288
- <p>an options hash that contains the contact attributes. Currently only
289
- supports the name attribute.</p>
290
- </div>
291
-
292
- </li>
293
-
294
- </ul>
295
-
296
- <p class="tag_title">Returns:</p>
297
- <ul class="return">
298
-
299
- <li>
300
-
301
-
302
- <span class='type'>(<tt>Hash</tt>)</span>
303
-
304
-
305
-
306
- &mdash;
307
- <div class='inline'>
308
- <p>returns the hash containing the contact attributes</p>
309
- </div>
310
-
311
- </li>
312
-
313
- </ul>
314
-
315
- </div><table class="source_code">
316
- <tr>
317
- <td>
318
- <pre class="lines">
319
-
320
-
321
- 16
322
- 17
323
- 18
324
- 19
325
- 20</pre>
326
- </td>
327
- <td>
328
- <pre class="code"><span class="info file"># File 'lib/phones.rb', line 16</span>
329
-
330
- <span class='kw'>def</span> <span class='id identifier rubyid_add_phone_contact'>add_phone_contact</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>
331
- <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>
332
- <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>
333
- <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'>/phoneContacts</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>
334
- <span class='kw'>end</span></pre>
335
- </td>
336
- </tr>
337
- </table>
338
- </div>
339
-
340
- <div class="method_details ">
341
- <h3 class="signature " id="delete_phone_contact-instance_method">
342
-
343
- #<strong>delete_phone_contact</strong>(network_id, contact_id) &#x21d2; <tt>Integer</tt>
344
-
345
-
346
-
347
-
348
-
349
- </h3><div class="docstring">
350
- <div class="discussion">
351
-
352
- <p>Delete a single phone contact</p>
353
-
354
-
355
- </div>
356
- </div>
357
- <div class="tags">
358
- <p class="tag_title">Parameters:</p>
359
- <ul class="param">
360
-
361
- <li>
362
-
363
- <span class='name'>network_id</span>
364
-
365
-
366
- <span class='type'>(<tt>String</tt>)</span>
367
-
368
-
369
-
370
- &mdash;
371
- <div class='inline'>
372
- <p>the network id you want to delete the contact on</p>
373
- </div>
374
-
375
- </li>
376
-
377
- <li>
378
-
379
- <span class='name'>contact_id</span>
380
-
381
-
382
- <span class='type'>(<tt>String</tt>)</span>
383
-
384
-
385
-
386
- &mdash;
387
- <div class='inline'>
388
- <p>the ID of the contact you want to delete</p>
389
- </div>
390
-
391
- </li>
392
-
393
- </ul>
394
-
395
- <p class="tag_title">Returns:</p>
396
- <ul class="return">
397
-
398
- <li>
399
-
400
-
401
- <span class='type'>(<tt>Integer</tt>)</span>
402
-
403
-
404
-
405
- &mdash;
406
- <div class='inline'>
407
- <p>HTTP Code</p>
408
- </div>
409
-
410
- </li>
411
-
412
- </ul>
413
-
414
- </div><table class="source_code">
415
- <tr>
416
- <td>
417
- <pre class="lines">
418
-
419
-
420
- 37
421
- 38
422
- 39</pre>
423
- </td>
424
- <td>
425
- <pre class="code"><span class="info file"># File 'lib/phones.rb', line 37</span>
426
-
427
- <span class='kw'>def</span> <span class='id identifier rubyid_delete_phone_contact'>delete_phone_contact</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_contact_id'>contact_id</span><span class='rparen'>)</span>
428
- <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'>/phoneContacts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contact_id'>contact_id</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'>DELETE</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
429
- <span class='kw'>end</span></pre>
430
- </td>
431
- </tr>
432
- </table>
433
- </div>
434
-
435
- <div class="method_details ">
436
- <h3 class="signature " id="list_phone_contacts-instance_method">
437
-
438
- #<strong>list_phone_contacts</strong>(network_id) &#x21d2; <tt>Array</tt>
439
-
440
-
441
-
442
-
443
-
444
- </h3><div class="docstring">
445
- <div class="discussion">
446
-
447
- <p>Get list of phone contacts</p>
448
-
449
-
450
- </div>
451
- </div>
452
- <div class="tags">
453
- <p class="tag_title">Parameters:</p>
454
- <ul class="param">
455
-
456
- <li>
457
-
458
- <span class='name'>network_id</span>
459
-
460
-
461
- <span class='type'>(<tt>String</tt>)</span>
462
-
463
-
464
-
465
- &mdash;
466
- <div class='inline'>
467
- <p>the network id you want to list contacts for</p>
468
- </div>
469
-
470
- </li>
471
-
472
- </ul>
473
-
474
- <p class="tag_title">Returns:</p>
475
- <ul class="return">
476
-
477
- <li>
478
-
479
-
480
- <span class='type'>(<tt>Array</tt>)</span>
481
-
482
-
483
-
484
- &mdash;
485
- <div class='inline'>
486
- <p>an array of hashes containing attribute information for each contact</p>
487
- </div>
488
-
489
- </li>
490
-
491
- </ul>
492
-
493
- </div><table class="source_code">
494
- <tr>
495
- <td>
496
- <pre class="lines">
497
-
498
-
499
- 8
500
- 9
501
- 10</pre>
502
- </td>
503
- <td>
504
- <pre class="code"><span class="info file"># File 'lib/phones.rb', line 8</span>
505
-
506
- <span class='kw'>def</span> <span class='id identifier rubyid_list_phone_contacts'>list_phone_contacts</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
507
- <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'>/phoneContacts</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>
508
- <span class='kw'>end</span></pre>
509
- </td>
510
- </tr>
511
- </table>
512
- </div>
513
-
514
- <div class="method_details ">
515
- <h3 class="signature " id="update_phone_contact-instance_method">
516
-
517
- #<strong>update_phone_contact</strong>(network_id, contact_id, options) &#x21d2; <tt>Hash</tt>
518
-
519
-
520
-
521
-
522
-
523
- </h3><div class="docstring">
524
- <div class="discussion">
525
-
526
- <p>Update a single phone contact</p>
527
-
528
-
529
- </div>
530
- </div>
531
- <div class="tags">
532
- <p class="tag_title">Parameters:</p>
533
- <ul class="param">
534
-
535
- <li>
536
-
537
- <span class='name'>network_id</span>
538
-
539
-
540
- <span class='type'>(<tt>String</tt>)</span>
541
-
542
-
543
-
544
- &mdash;
545
- <div class='inline'>
546
- <p>the network id you want to update the contact in</p>
547
- </div>
548
-
549
- </li>
550
-
551
- <li>
552
-
553
- <span class='name'>contact_id</span>
554
-
555
-
556
- <span class='type'>(<tt>String</tt>)</span>
557
-
558
-
559
-
560
- &mdash;
561
- <div class='inline'>
562
- <p>the ID of the contact you want to update</p>
563
- </div>
564
-
565
- </li>
566
-
567
- <li>
568
-
569
- <span class='name'>options</span>
570
-
571
-
572
- <span class='type'>(<tt>Hash</tt>)</span>
573
-
574
-
575
-
576
- &mdash;
577
- <div class='inline'>
578
- <p>an options hash that contains the contact attributes. Currently only
579
- supports the name attribute.</p>
580
- </div>
581
-
582
- </li>
583
-
584
- </ul>
585
-
586
- <p class="tag_title">Returns:</p>
587
- <ul class="return">
588
-
589
- <li>
590
-
591
-
592
- <span class='type'>(<tt>Hash</tt>)</span>
593
-
594
-
595
-
596
- &mdash;
597
- <div class='inline'>
598
- <p>returns the hash containing the contacts updated attributes</p>
599
- </div>
600
-
601
- </li>
602
-
603
- </ul>
604
-
605
- </div><table class="source_code">
606
- <tr>
607
- <td>
608
- <pre class="lines">
609
-
610
-
611
- 27
612
- 28
613
- 29
614
- 30
615
- 31</pre>
616
- </td>
617
- <td>
618
- <pre class="code"><span class="info file"># File 'lib/phones.rb', line 27</span>
619
-
620
- <span class='kw'>def</span> <span class='id identifier rubyid_update_phone_contact'>update_phone_contact</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_contact_id'>contact_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
621
- <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>
622
- <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>
623
- <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'>/phoneContacts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contact_id'>contact_id</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>
624
- <span class='kw'>end</span></pre>
625
- </td>
626
- </tr>
627
- </table>
628
- </div>
629
-
630
- </div>
631
-
632
- </div>
633
-
634
- <div id="footer">
635
- Generated on Thu Nov 17 22:15:39 2016 by
636
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
637
- 0.9.5 (ruby-2.3.0).
638
- </div>
639
-
640
- </div>
641
- </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: Phones
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 = "Phones";
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 (P)</a> &raquo;
40
+
41
+
42
+ <span class="title">Phones</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: Phones
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/phones.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+ <h2>Overview</h2><div class="docstring">
94
+ <div class="discussion">
95
+
96
+ <p>Phones 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="#add_phone_contact-instance_method" title="#add_phone_contact (instance method)">#<strong>add_phone_contact</strong>(network_id, options) &#x21d2; Hash </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>Add a single phone contact.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#delete_phone_contact-instance_method" title="#delete_phone_contact (instance method)">#<strong>delete_phone_contact</strong>(network_id, contact_id) &#x21d2; Integer </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>Delete a single phone contact.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#list_phone_contacts-instance_method" title="#list_phone_contacts (instance method)">#<strong>list_phone_contacts</strong>(network_id) &#x21d2; Array </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>Get list of phone contacts.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#update_phone_contact-instance_method" title="#update_phone_contact (instance method)">#<strong>update_phone_contact</strong>(network_id, contact_id, options) &#x21d2; Hash </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>Update a single phone contact.</p>
226
+ </div></span>
227
+
228
+ </li>
229
+
230
+
231
+ </ul>
232
+
233
+
234
+
235
+
236
+ <div id="instance_method_details" class="method_details_list">
237
+ <h2>Instance Method Details</h2>
238
+
239
+
240
+ <div class="method_details first">
241
+ <h3 class="signature first" id="add_phone_contact-instance_method">
242
+
243
+ #<strong>add_phone_contact</strong>(network_id, options) &#x21d2; <tt>Hash</tt>
244
+
245
+
246
+
247
+
248
+
249
+ </h3><div class="docstring">
250
+ <div class="discussion">
251
+
252
+ <p>Add a single phone contact</p>
253
+
254
+
255
+ </div>
256
+ </div>
257
+ <div class="tags">
258
+ <p class="tag_title">Parameters:</p>
259
+ <ul class="param">
260
+
261
+ <li>
262
+
263
+ <span class='name'>network_id</span>
264
+
265
+
266
+ <span class='type'>(<tt>String</tt>)</span>
267
+
268
+
269
+
270
+ &mdash;
271
+ <div class='inline'>
272
+ <p>the network id you want to add the contact to</p>
273
+ </div>
274
+
275
+ </li>
276
+
277
+ <li>
278
+
279
+ <span class='name'>options</span>
280
+
281
+
282
+ <span class='type'>(<tt>Hash</tt>)</span>
283
+
284
+
285
+
286
+ &mdash;
287
+ <div class='inline'>
288
+ <p>an options hash that contains the contact attributes. Currently only
289
+ supports the name attribute.</p>
290
+ </div>
291
+
292
+ </li>
293
+
294
+ </ul>
295
+
296
+ <p class="tag_title">Returns:</p>
297
+ <ul class="return">
298
+
299
+ <li>
300
+
301
+
302
+ <span class='type'>(<tt>Hash</tt>)</span>
303
+
304
+
305
+
306
+ &mdash;
307
+ <div class='inline'>
308
+ <p>returns the hash containing the contact attributes</p>
309
+ </div>
310
+
311
+ </li>
312
+
313
+ </ul>
314
+
315
+ </div><table class="source_code">
316
+ <tr>
317
+ <td>
318
+ <pre class="lines">
319
+
320
+
321
+ 16
322
+ 17
323
+ 18
324
+ 19
325
+ 20</pre>
326
+ </td>
327
+ <td>
328
+ <pre class="code"><span class="info file"># File 'lib/phones.rb', line 16</span>
329
+
330
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_phone_contact'>add_phone_contact</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>
331
+ <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>
332
+ <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>
333
+ <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'>/phoneContacts</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>
334
+ <span class='kw'>end</span></pre>
335
+ </td>
336
+ </tr>
337
+ </table>
338
+ </div>
339
+
340
+ <div class="method_details ">
341
+ <h3 class="signature " id="delete_phone_contact-instance_method">
342
+
343
+ #<strong>delete_phone_contact</strong>(network_id, contact_id) &#x21d2; <tt>Integer</tt>
344
+
345
+
346
+
347
+
348
+
349
+ </h3><div class="docstring">
350
+ <div class="discussion">
351
+
352
+ <p>Delete a single phone contact</p>
353
+
354
+
355
+ </div>
356
+ </div>
357
+ <div class="tags">
358
+ <p class="tag_title">Parameters:</p>
359
+ <ul class="param">
360
+
361
+ <li>
362
+
363
+ <span class='name'>network_id</span>
364
+
365
+
366
+ <span class='type'>(<tt>String</tt>)</span>
367
+
368
+
369
+
370
+ &mdash;
371
+ <div class='inline'>
372
+ <p>the network id you want to delete the contact on</p>
373
+ </div>
374
+
375
+ </li>
376
+
377
+ <li>
378
+
379
+ <span class='name'>contact_id</span>
380
+
381
+
382
+ <span class='type'>(<tt>String</tt>)</span>
383
+
384
+
385
+
386
+ &mdash;
387
+ <div class='inline'>
388
+ <p>the ID of the contact you want to delete</p>
389
+ </div>
390
+
391
+ </li>
392
+
393
+ </ul>
394
+
395
+ <p class="tag_title">Returns:</p>
396
+ <ul class="return">
397
+
398
+ <li>
399
+
400
+
401
+ <span class='type'>(<tt>Integer</tt>)</span>
402
+
403
+
404
+
405
+ &mdash;
406
+ <div class='inline'>
407
+ <p>HTTP Code</p>
408
+ </div>
409
+
410
+ </li>
411
+
412
+ </ul>
413
+
414
+ </div><table class="source_code">
415
+ <tr>
416
+ <td>
417
+ <pre class="lines">
418
+
419
+
420
+ 37
421
+ 38
422
+ 39</pre>
423
+ </td>
424
+ <td>
425
+ <pre class="code"><span class="info file"># File 'lib/phones.rb', line 37</span>
426
+
427
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete_phone_contact'>delete_phone_contact</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_contact_id'>contact_id</span><span class='rparen'>)</span>
428
+ <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'>/phoneContacts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contact_id'>contact_id</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'>DELETE</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
429
+ <span class='kw'>end</span></pre>
430
+ </td>
431
+ </tr>
432
+ </table>
433
+ </div>
434
+
435
+ <div class="method_details ">
436
+ <h3 class="signature " id="list_phone_contacts-instance_method">
437
+
438
+ #<strong>list_phone_contacts</strong>(network_id) &#x21d2; <tt>Array</tt>
439
+
440
+
441
+
442
+
443
+
444
+ </h3><div class="docstring">
445
+ <div class="discussion">
446
+
447
+ <p>Get list of phone contacts</p>
448
+
449
+
450
+ </div>
451
+ </div>
452
+ <div class="tags">
453
+ <p class="tag_title">Parameters:</p>
454
+ <ul class="param">
455
+
456
+ <li>
457
+
458
+ <span class='name'>network_id</span>
459
+
460
+
461
+ <span class='type'>(<tt>String</tt>)</span>
462
+
463
+
464
+
465
+ &mdash;
466
+ <div class='inline'>
467
+ <p>the network id you want to list contacts for</p>
468
+ </div>
469
+
470
+ </li>
471
+
472
+ </ul>
473
+
474
+ <p class="tag_title">Returns:</p>
475
+ <ul class="return">
476
+
477
+ <li>
478
+
479
+
480
+ <span class='type'>(<tt>Array</tt>)</span>
481
+
482
+
483
+
484
+ &mdash;
485
+ <div class='inline'>
486
+ <p>an array of hashes containing attribute information for each contact</p>
487
+ </div>
488
+
489
+ </li>
490
+
491
+ </ul>
492
+
493
+ </div><table class="source_code">
494
+ <tr>
495
+ <td>
496
+ <pre class="lines">
497
+
498
+
499
+ 8
500
+ 9
501
+ 10</pre>
502
+ </td>
503
+ <td>
504
+ <pre class="code"><span class="info file"># File 'lib/phones.rb', line 8</span>
505
+
506
+ <span class='kw'>def</span> <span class='id identifier rubyid_list_phone_contacts'>list_phone_contacts</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='rparen'>)</span>
507
+ <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'>/phoneContacts</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>
508
+ <span class='kw'>end</span></pre>
509
+ </td>
510
+ </tr>
511
+ </table>
512
+ </div>
513
+
514
+ <div class="method_details ">
515
+ <h3 class="signature " id="update_phone_contact-instance_method">
516
+
517
+ #<strong>update_phone_contact</strong>(network_id, contact_id, options) &#x21d2; <tt>Hash</tt>
518
+
519
+
520
+
521
+
522
+
523
+ </h3><div class="docstring">
524
+ <div class="discussion">
525
+
526
+ <p>Update a single phone contact</p>
527
+
528
+
529
+ </div>
530
+ </div>
531
+ <div class="tags">
532
+ <p class="tag_title">Parameters:</p>
533
+ <ul class="param">
534
+
535
+ <li>
536
+
537
+ <span class='name'>network_id</span>
538
+
539
+
540
+ <span class='type'>(<tt>String</tt>)</span>
541
+
542
+
543
+
544
+ &mdash;
545
+ <div class='inline'>
546
+ <p>the network id you want to update the contact in</p>
547
+ </div>
548
+
549
+ </li>
550
+
551
+ <li>
552
+
553
+ <span class='name'>contact_id</span>
554
+
555
+
556
+ <span class='type'>(<tt>String</tt>)</span>
557
+
558
+
559
+
560
+ &mdash;
561
+ <div class='inline'>
562
+ <p>the ID of the contact you want to update</p>
563
+ </div>
564
+
565
+ </li>
566
+
567
+ <li>
568
+
569
+ <span class='name'>options</span>
570
+
571
+
572
+ <span class='type'>(<tt>Hash</tt>)</span>
573
+
574
+
575
+
576
+ &mdash;
577
+ <div class='inline'>
578
+ <p>an options hash that contains the contact attributes. Currently only
579
+ supports the name attribute.</p>
580
+ </div>
581
+
582
+ </li>
583
+
584
+ </ul>
585
+
586
+ <p class="tag_title">Returns:</p>
587
+ <ul class="return">
588
+
589
+ <li>
590
+
591
+
592
+ <span class='type'>(<tt>Hash</tt>)</span>
593
+
594
+
595
+
596
+ &mdash;
597
+ <div class='inline'>
598
+ <p>returns the hash containing the contacts updated attributes</p>
599
+ </div>
600
+
601
+ </li>
602
+
603
+ </ul>
604
+
605
+ </div><table class="source_code">
606
+ <tr>
607
+ <td>
608
+ <pre class="lines">
609
+
610
+
611
+ 27
612
+ 28
613
+ 29
614
+ 30
615
+ 31</pre>
616
+ </td>
617
+ <td>
618
+ <pre class="code"><span class="info file"># File 'lib/phones.rb', line 27</span>
619
+
620
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_phone_contact'>update_phone_contact</span><span class='lparen'>(</span><span class='id identifier rubyid_network_id'>network_id</span><span class='comma'>,</span> <span class='id identifier rubyid_contact_id'>contact_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
621
+ <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>
622
+ <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>
623
+ <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'>/phoneContacts/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_contact_id'>contact_id</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>
624
+ <span class='kw'>end</span></pre>
625
+ </td>
626
+ </tr>
627
+ </table>
628
+ </div>
629
+
630
+ </div>
631
+
632
+ </div>
633
+
634
+ <div id="footer">
635
+ Generated on Thu Nov 17 22:15:39 2016 by
636
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
637
+ 0.9.5 (ruby-2.3.0).
638
+ </div>
639
+
640
+ </div>
641
+ </body>
642
642
  </html>