dashboard-api 0.4.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 266b824f08c8b32e1bc872da10c21b2fd188f983
4
- data.tar.gz: d829191f5811d23b723f0df61483a1bf72dd9c3c
3
+ metadata.gz: 4a1c33d558d0b2d6ddbeaa9219a8d9ff6dca06dc
4
+ data.tar.gz: 95e2eaa4ab8556fba0d3d4a82232a5db85dea3cb
5
5
  SHA512:
6
- metadata.gz: 34a3bd893c7f312bad40e75824be69dc7fb84dc5e69068581644c3630ba49a0a0cc8181a89ca3dbe639319975909702108a480a1f913a837e3014c90e5ae9344
7
- data.tar.gz: d2185a40e6819f4584d1d9ce976becbc78c59e855e0799b3ac73dcaa4669726036399f02f20ddfc53da8f9c1cbb37a439ea4b52eb79980299ef77841d710e504
6
+ metadata.gz: 26e6b2aeced9bd82162308b99550a4a2769f76fac825a7770573b5d0ce80b7ad93708bbc5a2ad52a8f2bd8da2b10ff2e9b75e70a02c33cdf9540539caef55229
7
+ data.tar.gz: 55e8de734064da06fbe92500668c96e2742e9d1770b8e7334fd2815347215501037dc1aa8d792d6894c93418e036dd08961ca5e57cd1d534afe38135b251e404
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Dashboard API v0.3.0
1
+ # Dashboard API v0.9.0
2
2
  A ruby implementation of the [Meraki Dashboard API](https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API)
3
3
 
4
4
  Documentation [here](http://www.rubydoc.info/gems/dashboard-api/0.3.0)
@@ -68,7 +68,8 @@ ENV variables need to be set:
68
68
  * `switch_network` A test MS netwok that will test things like access policies, etc.
69
69
  * `mx_serial` A test MX that has client traffic passing through it
70
70
  * `spare_mr` A test MR used to claim in and out of networks
71
-
71
+ * `test_admin_id` The ID of a test admin used to test updating and deleting admins
72
+ * `config_template_id` A test configuration template network ID used to test removing a template
72
73
  It is recommended that you set up a test organization with test devices in it when working with developing new functionality to this gem, as to not potentially disturb any of your production networks.
73
74
 
74
75
  Once those are set and dependencies are installed, you can run the tests with
@@ -0,0 +1,604 @@
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: Admins
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 = "Admins";
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 (A)</a> &raquo;
40
+
41
+
42
+ <span class="title">Admins</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: Admins
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/admins.rb</dd>
89
+ </dl>
90
+
91
+ </div>
92
+
93
+ <h2>Overview</h2><div class="docstring">
94
+ <div class="discussion">
95
+
96
+ <p>Admins 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_admin-instance_method" title="#add_admin (instance method)">#<strong>add_admin</strong>(org_id, options) &#x21d2; Object </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 an admin to a specific org.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#list_admins-instance_method" title="#list_admins (instance method)">#<strong>list_admins</strong>(org_id) &#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>List all of the administrators for a given org.</p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#revoke_admin-instance_method" title="#revoke_admin (instance method)">#<strong>revoke_admin</strong>(org_id, admin_id) &#x21d2; Integer </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>Revoke an administrator for a specific org.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#update_admin-instance_method" title="#update_admin (instance method)">#<strong>update_admin</strong>(org_id, admin_id, options) &#x21d2; Object </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 an administrator for a specific org.</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_admin-instance_method">
242
+
243
+ #<strong>add_admin</strong>(org_id, options) &#x21d2; <tt>Object</tt>
244
+
245
+
246
+
247
+
248
+
249
+ </h3><div class="docstring">
250
+ <div class="discussion">
251
+
252
+ <p>Add an admin to a specific org</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'>org_id</span>
264
+
265
+
266
+ <span class='type'>(<tt>String</tt>)</span>
267
+
268
+
269
+
270
+ &mdash;
271
+ <div class='inline'>
272
+ <p>organization ID you want to add an administrator 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>option hash containing attributes for the new admin. Can contain: email,
289
+ name, orgAccess, tags and networks. See the Meraki API Documentation for
290
+ more details.</p>
291
+ </div>
292
+
293
+ </li>
294
+
295
+ </ul>
296
+
297
+
298
+ </div><table class="source_code">
299
+ <tr>
300
+ <td>
301
+ <pre class="lines">
302
+
303
+
304
+ 15
305
+ 16
306
+ 17
307
+ 18</pre>
308
+ </td>
309
+ <td>
310
+ <pre class="code"><span class="info file"># File 'lib/admins.rb', line 15</span>
311
+
312
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_admin'>add_admin</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
313
+ <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>
314
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/admins</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>
315
+ <span class='kw'>end</span></pre>
316
+ </td>
317
+ </tr>
318
+ </table>
319
+ </div>
320
+
321
+ <div class="method_details ">
322
+ <h3 class="signature " id="list_admins-instance_method">
323
+
324
+ #<strong>list_admins</strong>(org_id) &#x21d2; <tt>Array</tt>
325
+
326
+
327
+
328
+
329
+
330
+ </h3><div class="docstring">
331
+ <div class="discussion">
332
+
333
+ <p>List all of the administrators for a given org</p>
334
+
335
+
336
+ </div>
337
+ </div>
338
+ <div class="tags">
339
+ <p class="tag_title">Parameters:</p>
340
+ <ul class="param">
341
+
342
+ <li>
343
+
344
+ <span class='name'>org_id</span>
345
+
346
+
347
+ <span class='type'>(<tt>String</tt>)</span>
348
+
349
+
350
+
351
+ &mdash;
352
+ <div class='inline'>
353
+ <p>organization ID you want the list of administrators for</p>
354
+ </div>
355
+
356
+ </li>
357
+
358
+ </ul>
359
+
360
+ <p class="tag_title">Returns:</p>
361
+ <ul class="return">
362
+
363
+ <li>
364
+
365
+
366
+ <span class='type'>(<tt>Array</tt>)</span>
367
+
368
+
369
+
370
+ &mdash;
371
+ <div class='inline'>
372
+ <p>an array of hashes containing each admin and their attributes</p>
373
+ </div>
374
+
375
+ </li>
376
+
377
+ </ul>
378
+
379
+ </div><table class="source_code">
380
+ <tr>
381
+ <td>
382
+ <pre class="lines">
383
+
384
+
385
+ 7
386
+ 8
387
+ 9</pre>
388
+ </td>
389
+ <td>
390
+ <pre class="code"><span class="info file"># File 'lib/admins.rb', line 7</span>
391
+
392
+ <span class='kw'>def</span> <span class='id identifier rubyid_list_admins'>list_admins</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='rparen'>)</span>
393
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/admins</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>
394
+ <span class='kw'>end</span></pre>
395
+ </td>
396
+ </tr>
397
+ </table>
398
+ </div>
399
+
400
+ <div class="method_details ">
401
+ <h3 class="signature " id="revoke_admin-instance_method">
402
+
403
+ #<strong>revoke_admin</strong>(org_id, admin_id) &#x21d2; <tt>Integer</tt>
404
+
405
+
406
+
407
+
408
+
409
+ </h3><div class="docstring">
410
+ <div class="discussion">
411
+
412
+ <p>Revoke an administrator for a specific org</p>
413
+
414
+
415
+ </div>
416
+ </div>
417
+ <div class="tags">
418
+ <p class="tag_title">Parameters:</p>
419
+ <ul class="param">
420
+
421
+ <li>
422
+
423
+ <span class='name'>org_id</span>
424
+
425
+
426
+ <span class='type'>(<tt>String</tt>)</span>
427
+
428
+
429
+
430
+ &mdash;
431
+ <div class='inline'>
432
+ <p>organization ID you want to revoke access on</p>
433
+ </div>
434
+
435
+ </li>
436
+
437
+ <li>
438
+
439
+ <span class='name'>admin_id</span>
440
+
441
+
442
+ <span class='type'>(<tt>String</tt>)</span>
443
+
444
+
445
+
446
+ &mdash;
447
+ <div class='inline'>
448
+ <p>ID of the administrator you want to revoke</p>
449
+ </div>
450
+
451
+ </li>
452
+
453
+ </ul>
454
+
455
+ <p class="tag_title">Returns:</p>
456
+ <ul class="return">
457
+
458
+ <li>
459
+
460
+
461
+ <span class='type'>(<tt>Integer</tt>)</span>
462
+
463
+
464
+
465
+ &mdash;
466
+ <div class='inline'>
467
+ <p>HTTP Code</p>
468
+ </div>
469
+
470
+ </li>
471
+
472
+ </ul>
473
+
474
+ </div><table class="source_code">
475
+ <tr>
476
+ <td>
477
+ <pre class="lines">
478
+
479
+
480
+ 34
481
+ 35
482
+ 36</pre>
483
+ </td>
484
+ <td>
485
+ <pre class="code"><span class="info file"># File 'lib/admins.rb', line 34</span>
486
+
487
+ <span class='kw'>def</span> <span class='id identifier rubyid_revoke_admin'>revoke_admin</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_admin_id'>admin_id</span><span class='rparen'>)</span>
488
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/admins/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_admin_id'>admin_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>
489
+ <span class='kw'>end</span></pre>
490
+ </td>
491
+ </tr>
492
+ </table>
493
+ </div>
494
+
495
+ <div class="method_details ">
496
+ <h3 class="signature " id="update_admin-instance_method">
497
+
498
+ #<strong>update_admin</strong>(org_id, admin_id, options) &#x21d2; <tt>Object</tt>
499
+
500
+
501
+
502
+
503
+
504
+ </h3><div class="docstring">
505
+ <div class="discussion">
506
+
507
+ <p>Update an administrator for a specific org</p>
508
+
509
+
510
+ </div>
511
+ </div>
512
+ <div class="tags">
513
+ <p class="tag_title">Parameters:</p>
514
+ <ul class="param">
515
+
516
+ <li>
517
+
518
+ <span class='name'>org_id</span>
519
+
520
+
521
+ <span class='type'>(<tt>String</tt>)</span>
522
+
523
+
524
+
525
+ &mdash;
526
+ <div class='inline'>
527
+ <p>organization ID you want to update an administrator on</p>
528
+ </div>
529
+
530
+ </li>
531
+
532
+ <li>
533
+
534
+ <span class='name'>admin_id</span>
535
+
536
+
537
+ <span class='type'>(<tt>String</tt>)</span>
538
+
539
+
540
+
541
+ &mdash;
542
+ <div class='inline'>
543
+ <p>ID of the admin you want to update</p>
544
+ </div>
545
+
546
+ </li>
547
+
548
+ <li>
549
+
550
+ <span class='name'>options</span>
551
+
552
+
553
+ <span class='type'>(<tt>Hash</tt>)</span>
554
+
555
+
556
+
557
+ &mdash;
558
+ <div class='inline'>
559
+ <p>hash containing the attributes and values you want to update. Can contain:
560
+ email, name, orgAccess, tags and networks. See the Meraki API Documentation
561
+ for more details.</p>
562
+ </div>
563
+
564
+ </li>
565
+
566
+ </ul>
567
+
568
+
569
+ </div><table class="source_code">
570
+ <tr>
571
+ <td>
572
+ <pre class="lines">
573
+
574
+
575
+ 25
576
+ 26
577
+ 27
578
+ 28</pre>
579
+ </td>
580
+ <td>
581
+ <pre class="code"><span class="info file"># File 'lib/admins.rb', line 25</span>
582
+
583
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_admin'>update_admin</span><span class='lparen'>(</span><span class='id identifier rubyid_org_id'>org_id</span><span class='comma'>,</span> <span class='id identifier rubyid_admin_id'>admin_id</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
584
+ <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>
585
+ <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'>/organizations/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_org_id'>org_id</span><span class='embexpr_end'>}</span><span class='tstring_content'>/admins/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_admin_id'>admin_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>
586
+ <span class='kw'>end</span></pre>
587
+ </td>
588
+ </tr>
589
+ </table>
590
+ </div>
591
+
592
+ </div>
593
+
594
+ </div>
595
+
596
+ <div id="footer">
597
+ Generated on Wed Nov 16 21:55:08 2016 by
598
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
599
+ 0.9.5 (ruby-2.3.0).
600
+ </div>
601
+
602
+ </div>
603
+ </body>
604
+ </html>