zoom_markazuna 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +66 -0
  3. data/.gitignore +20 -0
  4. data/Gemfile +5 -0
  5. data/Gemfile.lock +95 -0
  6. data/LICENSE +22 -0
  7. data/Makefile +5 -0
  8. data/README.md +65 -0
  9. data/lib/zoom.rb +51 -0
  10. data/lib/zoom/actions/account.rb +93 -0
  11. data/lib/zoom/actions/group.rb +8 -0
  12. data/lib/zoom/actions/im/chat.rb +27 -0
  13. data/lib/zoom/actions/im/group.rb +10 -0
  14. data/lib/zoom/actions/m323_device.rb +8 -0
  15. data/lib/zoom/actions/meeting.rb +89 -0
  16. data/lib/zoom/actions/metrics.rb +27 -0
  17. data/lib/zoom/actions/recording.rb +33 -0
  18. data/lib/zoom/actions/report.rb +55 -0
  19. data/lib/zoom/actions/user.rb +146 -0
  20. data/lib/zoom/actions/webinar.rb +115 -0
  21. data/lib/zoom/client.rb +35 -0
  22. data/lib/zoom/clients/jwt.rb +22 -0
  23. data/lib/zoom/clients/oauth.rb +17 -0
  24. data/lib/zoom/constants.rb +103 -0
  25. data/lib/zoom/error.rb +10 -0
  26. data/lib/zoom/interface.rb +6 -0
  27. data/lib/zoom/params.rb +71 -0
  28. data/lib/zoom/utils.rb +49 -0
  29. data/lib/zoom/version.rb +5 -0
  30. data/spec/fixtures/account/list.json +18 -0
  31. data/spec/fixtures/account/settings_get.json +120 -0
  32. data/spec/fixtures/chat/get.json +16 -0
  33. data/spec/fixtures/chat/list.json +16 -0
  34. data/spec/fixtures/error/already_exists.json +4 -0
  35. data/spec/fixtures/error/not_found.json +4 -0
  36. data/spec/fixtures/error/user_not_exist.json +4 -0
  37. data/spec/fixtures/error/validation.json +10 -0
  38. data/spec/fixtures/mc_recording_list.json +51 -0
  39. data/spec/fixtures/meeting/create.json +29 -0
  40. data/spec/fixtures/meeting/delete.json +4 -0
  41. data/spec/fixtures/meeting/end.json +4 -0
  42. data/spec/fixtures/meeting/get.json +34 -0
  43. data/spec/fixtures/meeting/list.json +32 -0
  44. data/spec/fixtures/meeting/live.json +32 -0
  45. data/spec/fixtures/meeting/register.json +7 -0
  46. data/spec/fixtures/meeting/update.json +4 -0
  47. data/spec/fixtures/metrics_crc.json +105 -0
  48. data/spec/fixtures/metrics_meetingdetail.json +32 -0
  49. data/spec/fixtures/metrics_meetings.json +26 -0
  50. data/spec/fixtures/recording_delete.json +4 -0
  51. data/spec/fixtures/recording_get.json +37 -0
  52. data/spec/fixtures/recording_list.json +51 -0
  53. data/spec/fixtures/report/webinar/participants.json +18 -0
  54. data/spec/fixtures/report_getaccountreport.json +23 -0
  55. data/spec/fixtures/report_getdailyreport.json +83 -0
  56. data/spec/fixtures/report_getuserreport.json +24 -0
  57. data/spec/fixtures/user/assistant/delete.json +5 -0
  58. data/spec/fixtures/user/assistant/set.json +5 -0
  59. data/spec/fixtures/user/autocreate.json +51 -0
  60. data/spec/fixtures/user/autocreate2.json +51 -0
  61. data/spec/fixtures/user/create.json +7 -0
  62. data/spec/fixtures/user/custcreate.json +10 -0
  63. data/spec/fixtures/user/delete.json +0 -0
  64. data/spec/fixtures/user/get.json +23 -0
  65. data/spec/fixtures/user/getbyemail.json +8 -0
  66. data/spec/fixtures/user/list.json +23 -0
  67. data/spec/fixtures/user/pending.json +56 -0
  68. data/spec/fixtures/user/permanent_delete.json +4 -0
  69. data/spec/fixtures/user/settings_get.json +74 -0
  70. data/spec/fixtures/user/update.json +0 -0
  71. data/spec/fixtures/webinar/create.json +29 -0
  72. data/spec/fixtures/webinar/delete.json +0 -0
  73. data/spec/fixtures/webinar/list.json +20 -0
  74. data/spec/fixtures/webinar/past_webinar_list.json +8 -0
  75. data/spec/fixtures/webinar/registrant/add.json +7 -0
  76. data/spec/fixtures/webinar/registrant/get.json +25 -0
  77. data/spec/fixtures/webinar/registrant/list.json +36 -0
  78. data/spec/fixtures/webinar/update.json +0 -0
  79. data/spec/fixtures/webinar_delete.json +4 -0
  80. data/spec/fixtures/webinar_end.json +4 -0
  81. data/spec/fixtures/webinar_get.json +17 -0
  82. data/spec/fixtures/webinar_update.json +4 -0
  83. data/spec/lib/zoom/actions/account/list_spec.rb +58 -0
  84. data/spec/lib/zoom/actions/account/settings_get_spec.rb +50 -0
  85. data/spec/lib/zoom/actions/group/create_spec.rb +3 -0
  86. data/spec/lib/zoom/actions/group/delete_spec.rb +3 -0
  87. data/spec/lib/zoom/actions/group/edit_spec.rb +3 -0
  88. data/spec/lib/zoom/actions/group/get_spec.rb +3 -0
  89. data/spec/lib/zoom/actions/group/list_spec.rb +3 -0
  90. data/spec/lib/zoom/actions/group/member/add_spec.rb +3 -0
  91. data/spec/lib/zoom/actions/group/member/delete_spec.rb +3 -0
  92. data/spec/lib/zoom/actions/group/member/list_spec.rb +3 -0
  93. data/spec/lib/zoom/actions/im/chat/get_spec.rb +64 -0
  94. data/spec/lib/zoom/actions/im/chat/list_spec.rb +58 -0
  95. data/spec/lib/zoom/actions/im/group/create_spec.rb +3 -0
  96. data/spec/lib/zoom/actions/im/group/delete_spec.rb +3 -0
  97. data/spec/lib/zoom/actions/im/group/edit_spec.rb +3 -0
  98. data/spec/lib/zoom/actions/im/group/get_spec.rb +3 -0
  99. data/spec/lib/zoom/actions/im/group/list_spec.rb +3 -0
  100. data/spec/lib/zoom/actions/im/group/member/add_spec.rb +3 -0
  101. data/spec/lib/zoom/actions/im/group/member/delete_spec.rb +3 -0
  102. data/spec/lib/zoom/actions/im/group/member/list_spec.rb +3 -0
  103. data/spec/lib/zoom/actions/m323/device/create_spec.rb +3 -0
  104. data/spec/lib/zoom/actions/m323/device/delete_spec.rb +3 -0
  105. data/spec/lib/zoom/actions/m323/device/list_spec.rb +3 -0
  106. data/spec/lib/zoom/actions/m323/device/update_spec.rb +3 -0
  107. data/spec/lib/zoom/actions/ma/account/billing_update_spec.rb +3 -0
  108. data/spec/lib/zoom/actions/ma/account/create_spec.rb +3 -0
  109. data/spec/lib/zoom/actions/ma/account/delete_spec.rb +3 -0
  110. data/spec/lib/zoom/actions/ma/account/get_spec.rb +3 -0
  111. data/spec/lib/zoom/actions/ma/account/list_spec.rb +3 -0
  112. data/spec/lib/zoom/actions/ma/account/plan/add_spec.rb +0 -0
  113. data/spec/lib/zoom/actions/ma/account/plan/get_spec.rb +0 -0
  114. data/spec/lib/zoom/actions/ma/account/plan/subscribe_spec.rb +3 -0
  115. data/spec/lib/zoom/actions/ma/account/plan/update_spec.rb +3 -0
  116. data/spec/lib/zoom/actions/meeting/create_spec.rb +63 -0
  117. data/spec/lib/zoom/actions/meeting/delete_spec.rb +55 -0
  118. data/spec/lib/zoom/actions/meeting/end_spec.rb +55 -0
  119. data/spec/lib/zoom/actions/meeting/get_spec.rb +59 -0
  120. data/spec/lib/zoom/actions/meeting/list_spec.rb +48 -0
  121. data/spec/lib/zoom/actions/meeting/live_spec.rb +43 -0
  122. data/spec/lib/zoom/actions/meeting/register_spec.rb +45 -0
  123. data/spec/lib/zoom/actions/meeting/update_spec.rb +53 -0
  124. data/spec/lib/zoom/actions/metrics/crc_spec.rb +48 -0
  125. data/spec/lib/zoom/actions/metrics/im_spec.rb +3 -0
  126. data/spec/lib/zoom/actions/metrics/meetingdetail_spec.rb +51 -0
  127. data/spec/lib/zoom/actions/metrics/meetings_spec.rb +61 -0
  128. data/spec/lib/zoom/actions/metrics/qos_spec.rb +3 -0
  129. data/spec/lib/zoom/actions/metrics/webinardetail_spec.rb +3 -0
  130. data/spec/lib/zoom/actions/metrics/webinars_spec.rb +3 -0
  131. data/spec/lib/zoom/actions/metrics/zoomroomdetail_spec.rb +3 -0
  132. data/spec/lib/zoom/actions/metrics/zoomrooms_spec.rb +3 -0
  133. data/spec/lib/zoom/actions/recording/delete_spec.rb +52 -0
  134. data/spec/lib/zoom/actions/recording/get_spec.rb +66 -0
  135. data/spec/lib/zoom/actions/recording/list_spec.rb +51 -0
  136. data/spec/lib/zoom/actions/recording/mc_list_spec.rb +51 -0
  137. data/spec/lib/zoom/actions/report/daily_report_spec.rb +0 -0
  138. data/spec/lib/zoom/actions/report/hosts_report_spec.rb +0 -0
  139. data/spec/lib/zoom/actions/report/meeting_details_report_spec.rb +0 -0
  140. data/spec/lib/zoom/actions/report/meeting_participants_report_spec.rb +0 -0
  141. data/spec/lib/zoom/actions/report/meeting_polls_report_spec.rb +0 -0
  142. data/spec/lib/zoom/actions/report/meetings_report_spec.rb +0 -0
  143. data/spec/lib/zoom/actions/report/telephone_report_spec.rb +0 -0
  144. data/spec/lib/zoom/actions/report/webinar_details_report_spec.rb +0 -0
  145. data/spec/lib/zoom/actions/report/webinar_participants_report_spec.rb +44 -0
  146. data/spec/lib/zoom/actions/report/webinar_polls_report_spec.rb +0 -0
  147. data/spec/lib/zoom/actions/report/webinar_qa_report_spec.rb +0 -0
  148. data/spec/lib/zoom/actions/user/activate_spec.rb +3 -0
  149. data/spec/lib/zoom/actions/user/assistant/delete_spec.rb +3 -0
  150. data/spec/lib/zoom/actions/user/assistant/set_spec.rb +3 -0
  151. data/spec/lib/zoom/actions/user/autocreate2_spec.rb +59 -0
  152. data/spec/lib/zoom/actions/user/autocreate_spec.rb +58 -0
  153. data/spec/lib/zoom/actions/user/checkemail_spec.rb +3 -0
  154. data/spec/lib/zoom/actions/user/checkzpk_spec.rb +3 -0
  155. data/spec/lib/zoom/actions/user/create_spec.rb +102 -0
  156. data/spec/lib/zoom/actions/user/custcreate_spec.rb +59 -0
  157. data/spec/lib/zoom/actions/user/deactivate_spec.rb +3 -0
  158. data/spec/lib/zoom/actions/user/delete_spec.rb +44 -0
  159. data/spec/lib/zoom/actions/user/get_spec.rb +54 -0
  160. data/spec/lib/zoom/actions/user/getbyemail_spec.rb +54 -0
  161. data/spec/lib/zoom/actions/user/list_spec.rb +50 -0
  162. data/spec/lib/zoom/actions/user/revoketoken_spec.rb +3 -0
  163. data/spec/lib/zoom/actions/user/settings_get_spec.rb +56 -0
  164. data/spec/lib/zoom/actions/user/update_spec.rb +45 -0
  165. data/spec/lib/zoom/actions/user/updatepassword_spec.rb +3 -0
  166. data/spec/lib/zoom/actions/webinar/attendees_list_spec.rb +3 -0
  167. data/spec/lib/zoom/actions/webinar/create_spec.rb +59 -0
  168. data/spec/lib/zoom/actions/webinar/delete_spec.rb +44 -0
  169. data/spec/lib/zoom/actions/webinar/end_spec.rb +3 -0
  170. data/spec/lib/zoom/actions/webinar/get_spec.rb +66 -0
  171. data/spec/lib/zoom/actions/webinar/list_registration_spec.rb +3 -0
  172. data/spec/lib/zoom/actions/webinar/list_spec.rb +50 -0
  173. data/spec/lib/zoom/actions/webinar/panelists_spec.rb +3 -0
  174. data/spec/lib/zoom/actions/webinar/past_webinar_list_spec.rb +44 -0
  175. data/spec/lib/zoom/actions/webinar/polls_spec.rb +3 -0
  176. data/spec/lib/zoom/actions/webinar/questions_spec.rb +3 -0
  177. data/spec/lib/zoom/actions/webinar/register_spec.rb +3 -0
  178. data/spec/lib/zoom/actions/webinar/registrants/add_spec.rb +64 -0
  179. data/spec/lib/zoom/actions/webinar/registrants/get_spec.rb +49 -0
  180. data/spec/lib/zoom/actions/webinar/registrants/list_spec.rb +43 -0
  181. data/spec/lib/zoom/actions/webinar/registrants/update_status_spec.rb +42 -0
  182. data/spec/lib/zoom/actions/webinar/registration_cancel_spec.rb +3 -0
  183. data/spec/lib/zoom/actions/webinar/registration_spec.rb +3 -0
  184. data/spec/lib/zoom/actions/webinar/update_spec.rb +44 -0
  185. data/spec/lib/zoom/actions/webinar/uuid_list_spec.rb +3 -0
  186. data/spec/lib/zoom/client_spec.rb +76 -0
  187. data/spec/lib/zoom/params_spec.rb +81 -0
  188. data/spec/lib/zoom/utils_spec.rb +48 -0
  189. data/spec/spec_helper.rb +43 -0
  190. data/zoom_rb.gemspec +33 -0
  191. metadata +518 -0
@@ -0,0 +1,56 @@
1
+ {
2
+ "page_count": 5,
3
+ "total_records": 235,
4
+ "page_number": 1,
5
+ "page_size": 2,
6
+ "users": [
7
+ {
8
+ "email": "test@abc.com ",
9
+ "id": "dsfs23css23",
10
+ "created_at": "2012-11-25T12:00:00Z",
11
+ "first_name": "Lucy",
12
+ "last_name": "Li",
13
+ "type": 1,
14
+ "pic_url": "https://www.zoom.us/p/bNsPi",
15
+ "disable_chat": false,
16
+ "enable_e2e_encryption": false,
17
+ "enable_silent_mode": false,
18
+ "disable_group_hd": false,
19
+ "disable_recording": false,
20
+ "verified": 0,
21
+ "pmi": 0,
22
+ "meeting_capacity": 0,
23
+ "enable_webinar":false,
24
+ "enable_large":false,
25
+ "disable_feedback":false,
26
+ "disable_jbh_reminder": true,
27
+ "dept":"Engineer",
28
+ "timezone": "America/Los_Angeles",
29
+ "token":""
30
+ },
31
+ {
32
+ "email": "test2@abc.com ",
33
+ "id": "dsfs23css23",
34
+ "created_at": "2012-11-25T12:00:00Z",
35
+ "first_name": "Lily",
36
+ "last_name": "Sun",
37
+ "type": 2,
38
+ "pic_url": "https://www.zoom.us/p/bNsPi",
39
+ "disable_chat": false,
40
+ "enable_e2e_encryption": false,
41
+ "enable_silent_mode": false,
42
+ "disable_group_hd": false,
43
+ "disable_recording": false,
44
+ "verified": 0,
45
+ "pmi": 0,
46
+ "meeting_capacity": 0,
47
+ "enable_webinar":false,
48
+ "enable_large":false,
49
+ "disable_feedback":false,
50
+ "disable_jbh_reminder": true,
51
+ "dept":"Engineer",
52
+ "timezone": "America/Los_Angeles",
53
+ "token":""
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "65q23kd9sqliy612h23k",
3
+ "deleted_at": "2017-11-03T18:53:40Z"
4
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "scheduled_meeting": {
3
+ "host_video": true,
4
+ "participants_video": true,
5
+ "audio_type": "cloud",
6
+ "join_before_host": true,
7
+ "use_pmi_for_scheduled_meetings": true,
8
+ "use_pmi_for_instant_meetings": true,
9
+ "enforce_login": true,
10
+ "not_store_meeting_topic": true,
11
+ "force_pmi_jbh_password": true,
12
+ "pstn_password_protected": true
13
+ },
14
+ "in_meeting": {
15
+ "e2e_encryption": true,
16
+ "chat": true,
17
+ "private_chat": true,
18
+ "auto_saving_chat": true,
19
+ "entry_exit_chime": "all",
20
+ "record_play_voice": true,
21
+ "file_transfer": true,
22
+ "feedback": true,
23
+ "co_host": true,
24
+ "polling": true,
25
+ "attendee_on_hold": true,
26
+ "annotation": true,
27
+ "remote_control": true,
28
+ "non_verbal_feedback": true,
29
+ "breakout_room": true,
30
+ "remote_support": true,
31
+ "closed_caption": true,
32
+ "group_hd": true,
33
+ "virtual_background": true,
34
+ "far_end_camera_control": true,
35
+ "share_dual_camera": true,
36
+ "attention_tracking": true,
37
+ "waiting_room": true,
38
+ "allow_live_streaming": true
39
+ },
40
+ "email_notification": {
41
+ "jbh_reminder": true,
42
+ "cancel_meeting_reminder": true,
43
+ "alternative_host_reminder": true
44
+ },
45
+ "recording": {
46
+ "local_recording": true,
47
+ "cloud_recording": true,
48
+ "record_speaker_view": true,
49
+ "record_gallery_view": true,
50
+ "record_audio_file": true,
51
+ "save_chat_text": true,
52
+ "show_timestamp": true,
53
+ "recording_audio_transcript": true,
54
+ "auto_recording": "cloud",
55
+ "auto_delete_cmr": true,
56
+ "auto_delete_cmr_days": 42
57
+ },
58
+ "telephony": {
59
+ "third_party_audio": true,
60
+ "audio_conference_info": "Third party audio conference info",
61
+ "show_international_numbers_link": true
62
+ },
63
+ "tsp": {},
64
+ "feature": {
65
+ "meeting_capacity": 100,
66
+ "large_meeting": true,
67
+ "large_meeting_capacity": 1000,
68
+ "webinar": true,
69
+ "webinar_capacity": 500,
70
+ "cn_meeting": true,
71
+ "in_meeting": true,
72
+ "zoom_phone": true
73
+ }
74
+ }
File without changes
@@ -0,0 +1,29 @@
1
+ {
2
+ "uuid": "someBase64str!ng",
3
+ "id": 1234567890,
4
+ "host_id": "test_user_id",
5
+ "topic": "create webinar via rest api",
6
+ "type": 5,
7
+ "start_time": "2018-09-17T21:55:25Z",
8
+ "duration": 60,
9
+ "timezone": "America/New_York",
10
+ "created_at": "2018-09-17T21:55:25Z",
11
+ "start_url": "https://zoom.us/s/really_long_string_here",
12
+ "join_url": "https://zoom.us/j/1234567890",
13
+ "settings": {
14
+ "host_video": false,
15
+ "panelists_video": false,
16
+ "approval_type": 2,
17
+ "audio": "both",
18
+ "auto_recording": "none",
19
+ "enforce_login": false,
20
+ "enforce_login_domains": "",
21
+ "alternative_hosts": "",
22
+ "close_registration": false,
23
+ "show_share_button": true,
24
+ "allow_multiple_devices": true,
25
+ "practice_session": false,
26
+ "hd_video": false,
27
+ "question_answer": true
28
+ }
29
+ }
File without changes
@@ -0,0 +1,20 @@
1
+ {
2
+ "page_count": 1,
3
+ "page_number": 1,
4
+ "page_size": 30,
5
+ "total_records": 1,
6
+ "webinars": [
7
+ {
8
+ "uuid": "someBase64str!ng",
9
+ "id": 123456789,
10
+ "host_id": "test_user_id",
11
+ "topic": "testing123",
12
+ "type": 5,
13
+ "start_time": "2018-09-17T21:55:25Z",
14
+ "duration": 60,
15
+ "timezone": "America/New_York",
16
+ "created_at": "2018-09-17T21:55:25Z",
17
+ "join_url": "https://zoom.us/j/123456789"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "webinars": [
3
+ {
4
+ "uuid": "ABCDEFGHIJKLMNOPQRSTUV==",
5
+ "start_time": "2019-01-01T10:00:00Z"
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "registrant_id": "string",
3
+ "id": "string",
4
+ "topic": "string",
5
+ "start_time": "2018-10-03T00:10:16.960Z",
6
+ "join_url": "https://zoom.us/j/1234567890"
7
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "id": "FAKE",
3
+ "first_name": "Bobby",
4
+ "last_name": "Tables",
5
+ "email": "bobby_tables@example.org",
6
+ "address": "",
7
+ "city": "",
8
+ "country": "",
9
+ "zip": "",
10
+ "state": "",
11
+ "phone": "",
12
+ "industry": "",
13
+ "org": "",
14
+ "job_title": "",
15
+ "purchasing_time_frame": "",
16
+ "role_in_purchase_process": "",
17
+ "no_of_employees": "",
18
+ "comments": "",
19
+ "custom_questions": [
20
+
21
+ ],
22
+ "status": "approved",
23
+ "create_time": "2019-06-26T10:45:56Z",
24
+ "join_url": "https://zoom.us/w/FAKE"
25
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "page_count": 1,
3
+ "page_size": 1,
4
+ "total_records": 1,
5
+ "next_page_token": "string",
6
+ "registrants": [
7
+ {
8
+ "id": "string",
9
+ "email": "string",
10
+ "first_name": "string",
11
+ "last_name": "string",
12
+ "address": "string",
13
+ "city": "string",
14
+ "country": "string",
15
+ "zip": "string",
16
+ "state": "string",
17
+ "phone": "string",
18
+ "industry": "string",
19
+ "org": "string",
20
+ "job_title": "string",
21
+ "purchasing_time_frame": "Within a month",
22
+ "role_in_purchase_process": "Decision Maker",
23
+ "no_of_employees": "1-20",
24
+ "comments": "string",
25
+ "custom_questions": [
26
+ {
27
+ "title": "string",
28
+ "value": "string"
29
+ }
30
+ ],
31
+ "status": "string",
32
+ "create_time": "2018-10-02T23:59:31.080Z",
33
+ "join_url": "string"
34
+ }
35
+ ]
36
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "123456789",
3
+ "deleted_at": "2012-11-25T12:00:00Z"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "123456789",
3
+ "ended_at": "2012-11-25T12:00:00Z"
4
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "uuid":"9qU8IsjNTUuFFjqyWohT7A==",
3
+ "id": "123456789",
4
+ "start_url": "https://zoom.us/s/123456789?zpk=hs65q23kd9sqliy612h23k",
5
+ "join_url": "https://zoom.us/j/123456789",
6
+ "created_at": "2012-11-25T12:00:00Z",
7
+ "host_id": "dh23hdu23gd",
8
+ "topic": "Topic for this meeting",
9
+ "type": 5,
10
+ "start_time": "2012-11-25T12:00:00Z",
11
+ "duration": 30,
12
+ "timezone": "America/Los_Angeles",
13
+ "agenda": "",
14
+ "option_start_type": "video",
15
+ "option_audio": "both",
16
+ "status": 0
17
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "id": "123456789",
3
+ "updated_at": "2012-11-25T12:00:00Z"
4
+ }
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Zoom::Actions::Account do
6
+ let(:zc) { zoom_client }
7
+ let(:args) {
8
+ {}
9
+ }
10
+ describe '#account_list action' do
11
+ context 'with a valid response' do
12
+ before :each do
13
+ stub_request(
14
+ :get,
15
+ zoom_url('/accounts')
16
+ ).to_return(body: json_response('account', 'list'),
17
+ headers: { 'Content-Type' => 'application/json' })
18
+ end
19
+
20
+ it 'returns a hash' do
21
+ expect(zc.account_list(args)).to be_kind_of(Hash)
22
+ end
23
+
24
+ it "allows 'page_size and page_numbers" do
25
+ args[:page_number] = 1
26
+ args[:page_size] = 30
27
+ expect(zc.account_list(args)).to be_kind_of(Hash)
28
+ end
29
+
30
+ it "returns 'total_records" do
31
+ expect(zc.account_list(args)['total_records']).to eq(1)
32
+ end
33
+
34
+ it "returns 'accounts' Array" do
35
+ expect(zc.account_list(args)['accounts']).to be_kind_of(Array)
36
+ end
37
+
38
+ it 'raises an error when passed an invalid option' do
39
+ expect { zc.account_list(foo: 'bar') }.to raise_error(Zoom::ParameterNotPermitted, [:foo].to_s)
40
+ end
41
+ end
42
+
43
+ context 'with a 4xx response' do
44
+ before :each do
45
+ stub_request(
46
+ :get,
47
+ zoom_url('/accounts')
48
+ ).to_return(status: 404,
49
+ body: json_response('error', 'not_found'),
50
+ headers: { 'Content-Type' => 'application/json' })
51
+ end
52
+
53
+ it 'raises Zoom::Error exception' do
54
+ expect { zc.account_list }.to raise_error(Zoom::Error)
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Zoom::Actions::Account do
6
+ let(:zc) { zoom_client }
7
+ let(:args) { { id: 'ufR9342pRyf8ePFN92dttQ' } }
8
+
9
+ describe '#settings_get action' do
10
+ context 'with a valid response' do
11
+ before :each do
12
+ stub_request(
13
+ :get,
14
+ zoom_url("/accounts/#{args[:id]}/settings")
15
+ ).to_return(status: 200,
16
+ body: json_response('account', 'settings_get'),
17
+ headers: { 'Content-Type' => 'application/json' })
18
+ end
19
+
20
+ it 'requires id param' do
21
+ expect { zc.account_settings_get(filter_key(args, :id)) }.to raise_error(Zoom::ParameterMissing, '[:id]')
22
+ end
23
+
24
+ it 'returns a hash' do
25
+ expect(zc.account_settings_get(args)).to be_kind_of(Hash)
26
+ end
27
+
28
+ it 'returns same params' do
29
+ res = zc.account_settings_get(args)
30
+
31
+ expect(res.keys).to match_array(["email_notification", "feature", "in_meeting", "integration", "recording", "schedule_meting", "security", "telephony", "tsp", "zoom_rooms"])
32
+ end
33
+ end
34
+
35
+ context 'with a 4xx response' do
36
+ before :each do
37
+ stub_request(
38
+ :get,
39
+ zoom_url("/accounts/#{args[:id]}/settings")
40
+ ).to_return(status: 404,
41
+ body: json_response('error', 'validation'),
42
+ headers: { 'Content-Type' => 'application/json' })
43
+ end
44
+
45
+ it 'raises Zoom::Error exception' do
46
+ expect { zc.account_settings_get(args) }.to raise_error(Zoom::Error)
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'