zoom_rb 0.10.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -1
  3. data/CHANGELOG.md +63 -0
  4. data/Gemfile.lock +83 -53
  5. data/Makefile +1 -1
  6. data/README.md +21 -7
  7. data/lib/zoom/actions/account.rb +18 -76
  8. data/lib/zoom/actions/billing.rb +41 -0
  9. data/lib/zoom/actions/dashboard.rb +22 -0
  10. data/lib/zoom/actions/groups.rb +19 -0
  11. data/lib/zoom/actions/im/chat.rb +13 -14
  12. data/lib/zoom/actions/meeting.rb +38 -63
  13. data/lib/zoom/actions/phone.rb +15 -0
  14. data/lib/zoom/actions/recording.rb +13 -22
  15. data/lib/zoom/actions/report.rb +8 -43
  16. data/lib/zoom/actions/roles.rb +24 -0
  17. data/lib/zoom/actions/sip_audio.rb +34 -0
  18. data/lib/zoom/actions/token.rb +26 -0
  19. data/lib/zoom/actions/user.rb +66 -138
  20. data/lib/zoom/actions/webinar.rb +43 -90
  21. data/lib/zoom/actions.rb +59 -0
  22. data/lib/zoom/client.rb +27 -7
  23. data/lib/zoom/clients/oauth.rb +46 -3
  24. data/lib/zoom/constants/account/options/pay_modes.rb +12 -0
  25. data/lib/zoom/constants/account/settings/permitted_settings.rb +125 -0
  26. data/lib/zoom/constants/constants.rb +35 -0
  27. data/lib/zoom/constants/meeting/approval_types.rb +11 -0
  28. data/lib/zoom/constants/meeting/audio_type.rb +11 -0
  29. data/lib/zoom/constants/meeting/auto_recording.rb +11 -0
  30. data/lib/zoom/constants/meeting/registration_types.rb +11 -0
  31. data/lib/zoom/constants/meeting/types.rb +12 -0
  32. data/lib/zoom/constants/recurrence/monthly_weeks.rb +13 -0
  33. data/lib/zoom/constants/recurrence/types.rb +11 -0
  34. data/lib/zoom/constants/recurrence/weekly_days.rb +15 -0
  35. data/lib/zoom/constants/user/create_types.rb +12 -0
  36. data/lib/zoom/constants/user/types.rb +11 -0
  37. data/lib/zoom/constants/webinar/approval_types.rb +11 -0
  38. data/lib/zoom/constants/webinar/audio_type.rb +11 -0
  39. data/lib/zoom/constants/webinar/auto_recording.rb +11 -0
  40. data/lib/zoom/constants/webinar/registration_types.rb +11 -0
  41. data/lib/zoom/constants/webinar/types.rb +11 -0
  42. data/lib/zoom/error.rb +9 -1
  43. data/lib/zoom/params.rb +51 -12
  44. data/lib/zoom/utils.rb +23 -15
  45. data/lib/zoom/version.rb +2 -2
  46. data/lib/{zoom.rb → zoom_rb.rb} +9 -3
  47. data/spec/fixtures/account/create.json +6 -0
  48. data/spec/{lib/zoom/actions/report/hosts_report_spec.rb → fixtures/account/delete.json} +0 -0
  49. data/spec/fixtures/account/get.json +13 -0
  50. data/spec/fixtures/account/managed_domains.json +7 -0
  51. data/spec/fixtures/account/options_update.json +7 -0
  52. data/spec/fixtures/account/settings_get.json +1 -1
  53. data/spec/{lib/zoom/actions/report/meeting_polls_report_spec.rb → fixtures/account/settings_update.json} +0 -0
  54. data/spec/fixtures/account/trusted_domains.json +3 -0
  55. data/spec/fixtures/billing/get.json +12 -0
  56. data/spec/fixtures/billing/plans_list.json +44 -0
  57. data/spec/fixtures/billing/plans_subscribe.json +30 -0
  58. data/spec/fixtures/billing/plans_usage.json +30 -0
  59. data/spec/{lib/zoom/actions/report/meetings_report_spec.rb → fixtures/billing/update.json} +0 -0
  60. data/spec/fixtures/chat/channels/get.json +5 -0
  61. data/spec/fixtures/chat/users/channels/list.json +17 -0
  62. data/spec/fixtures/dashboard/crc.json +104 -0
  63. data/spec/fixtures/dashboard/meeting/detail.json +20 -0
  64. data/spec/fixtures/dashboard/meeting/participants.json +56 -0
  65. data/spec/fixtures/{metrics_meetings.json → dashboard/meetings.json} +1 -2
  66. data/spec/fixtures/error/admin_cannot_activated.json +4 -0
  67. data/spec/fixtures/error/channel_not_found.json +4 -0
  68. data/spec/fixtures/error/group_does_not_exist.json +4 -0
  69. data/spec/fixtures/error/group_not_belong_to_account.json +4 -0
  70. data/spec/fixtures/error/group_not_exist.json +4 -0
  71. data/spec/fixtures/error/meeting_not_exist.json +4 -0
  72. data/spec/fixtures/error/next_page_token_invalid.json +4 -0
  73. data/spec/fixtures/error/not_found_administrator.json +4 -0
  74. data/spec/fixtures/error/unauthorized_request.json +4 -0
  75. data/spec/fixtures/error/user_not_exist.json +1 -1
  76. data/spec/fixtures/groups/create.json +5 -0
  77. data/spec/fixtures/groups/get.json +5 -0
  78. data/spec/fixtures/groups/list.json +15 -0
  79. data/spec/{lib/zoom/actions/report/telephone_report_spec.rb → fixtures/groups/update.json} +0 -0
  80. data/spec/fixtures/meeting/add_registrant.json +7 -0
  81. data/spec/fixtures/meeting/create.json +31 -16
  82. data/spec/fixtures/meeting/get.json +43 -33
  83. data/spec/fixtures/meeting/invitation.json +3 -0
  84. data/spec/fixtures/meeting/live_stream/errors/meeting_not_found.json +4 -0
  85. data/spec/fixtures/meeting/live_stream/errors/missing_field.json +10 -0
  86. data/spec/fixtures/{recording_get.json → recording/get.json} +17 -6
  87. data/spec/fixtures/recording/list.json +53 -0
  88. data/spec/fixtures/recording/settings/get.json +7 -0
  89. data/spec/fixtures/report/meeting/participants.json +17 -0
  90. data/spec/fixtures/report/meeting.json +19 -0
  91. data/spec/fixtures/roles/assign.json +4 -0
  92. data/spec/fixtures/roles/create.json +9 -0
  93. data/spec/fixtures/roles/get.json +11 -0
  94. data/spec/fixtures/roles/list.json +29 -0
  95. data/spec/fixtures/roles/members.json +15 -0
  96. data/spec/fixtures/sip_audio/sip_trunks_get.json +19 -0
  97. data/spec/fixtures/sip_audio/sip_trunks_internal_callout_countries_add.json +10 -0
  98. data/spec/fixtures/sip_audio/sip_trunks_internal_callout_country_list.json +15 -0
  99. data/spec/fixtures/sip_audio/sip_trunks_internal_numbers_add.json +14 -0
  100. data/spec/fixtures/sip_audio/sip_trunks_internal_numbers_list.json +16 -0
  101. data/spec/fixtures/sip_audio/sip_trunks_numbers_assign.json +7 -0
  102. data/spec/fixtures/sip_audio/sip_trunks_numbers_list.json +9 -0
  103. data/spec/fixtures/token/access_token.json +7 -0
  104. data/spec/fixtures/token/data_compliance.json +8 -0
  105. data/spec/fixtures/token/refresh_token.json +7 -0
  106. data/spec/fixtures/user/assistant/create.json +4 -0
  107. data/spec/fixtures/user/assistant/list.json +8 -0
  108. data/spec/fixtures/user/email_check.json +3 -0
  109. data/spec/fixtures/user/get.json +35 -21
  110. data/spec/fixtures/user/list.json +17 -13
  111. data/spec/fixtures/user/permissions.json +65 -0
  112. data/spec/fixtures/user/recording/list.json +50 -0
  113. data/spec/fixtures/user/scheduler/list.json +12 -0
  114. data/spec/fixtures/user/token.json +3 -0
  115. data/spec/{lib/zoom/actions/report/webinar_details_report_spec.rb → fixtures/user/update_email.json} +0 -0
  116. data/spec/{lib/zoom/actions/report/webinar_polls_report_spec.rb → fixtures/user/update_password.json} +0 -0
  117. data/spec/{lib/zoom/actions/report/webinar_qa_report_spec.rb → fixtures/user/update_status.json} +0 -0
  118. data/spec/fixtures/user/vanity_name.json +3 -0
  119. data/spec/fixtures/webinar/panelist_list.json +12 -0
  120. data/spec/fixtures/webinar/poll_get.json +13 -0
  121. data/spec/fixtures/webinar/polls_list.json +16 -0
  122. data/spec/lib/zoom/actions/account/create_spec.rb +68 -0
  123. data/spec/lib/zoom/actions/account/delete_spec.rb +44 -0
  124. data/spec/lib/zoom/actions/account/get_locked_settings_spec.rb +43 -0
  125. data/spec/lib/zoom/actions/account/get_spec.rb +43 -0
  126. data/spec/lib/zoom/actions/account/managed_domains_spec.rb +43 -0
  127. data/spec/lib/zoom/actions/account/options_update_spec.rb +58 -0
  128. data/spec/lib/zoom/actions/account/settings_get_spec.rb +5 -5
  129. data/spec/lib/zoom/actions/account/settings_update_spec.rb +55 -0
  130. data/spec/lib/zoom/actions/account/trusted_domains_spec.rb +43 -0
  131. data/spec/lib/zoom/actions/billing/get_spec.rb +48 -0
  132. data/spec/lib/zoom/actions/billing/plans_list_spec.rb +48 -0
  133. data/spec/lib/zoom/actions/billing/plans_subscribe_spec.rb +69 -0
  134. data/spec/lib/zoom/actions/billing/plans_usage_spec.rb +48 -0
  135. data/spec/lib/zoom/actions/billing/update_spec.rb +64 -0
  136. data/spec/lib/zoom/actions/dashboard/crc_spec.rb +33 -0
  137. data/spec/lib/zoom/actions/dashboard/meeting_details_spec.rb +62 -0
  138. data/spec/lib/zoom/actions/dashboard/meeting_participants_spec.rb +74 -0
  139. data/spec/lib/zoom/actions/dashboard/meetings_spec.rb +63 -0
  140. data/spec/lib/zoom/actions/groups/create_spec.rb +98 -0
  141. data/spec/lib/zoom/actions/{group → groups}/delete_spec.rb +0 -0
  142. data/spec/lib/zoom/actions/{group → groups}/edit_spec.rb +0 -0
  143. data/spec/lib/zoom/actions/groups/get_spec.rb +62 -0
  144. data/spec/lib/zoom/actions/groups/list_spec.rb +47 -0
  145. data/spec/lib/zoom/actions/{group → groups}/member/add_spec.rb +0 -0
  146. data/spec/lib/zoom/actions/{group → groups}/member/delete_spec.rb +0 -0
  147. data/spec/lib/zoom/actions/{group → groups/member}/list_spec.rb +0 -0
  148. data/spec/lib/zoom/actions/groups/update_spec.rb +59 -0
  149. data/spec/lib/zoom/actions/im/chat/channels/get_spec.rb +64 -0
  150. data/spec/lib/zoom/actions/im/chat/users/channels/get_spec.rb +45 -0
  151. data/spec/lib/zoom/actions/meeting/add_registrant_spec.rb +30 -0
  152. data/spec/lib/zoom/actions/meeting/create_spec.rb +13 -13
  153. data/spec/lib/zoom/actions/meeting/delete_spec.rb +17 -34
  154. data/spec/lib/zoom/actions/meeting/get_spec.rb +21 -31
  155. data/spec/lib/zoom/actions/meeting/invitation_spec.rb +48 -0
  156. data/spec/lib/zoom/actions/meeting/livestream_spec.rb +61 -0
  157. data/spec/lib/zoom/actions/meeting/update_spec.rb +48 -42
  158. data/spec/lib/zoom/actions/recording/file_delete_spec.rb +33 -0
  159. data/spec/lib/zoom/actions/recording/get_spec.rb +19 -35
  160. data/spec/lib/zoom/actions/recording/list_spec.rb +20 -26
  161. data/spec/lib/zoom/actions/recording/settings/get_spec.rb +42 -0
  162. data/spec/lib/zoom/actions/recording/settings/update_spec.rb +32 -0
  163. data/spec/lib/zoom/actions/report/meeting_details_report_spec.rb +44 -0
  164. data/spec/lib/zoom/actions/report/meeting_participants_report_spec.rb +44 -0
  165. data/spec/lib/zoom/actions/roles/assign_spec.rb +25 -0
  166. data/spec/lib/zoom/actions/roles/create_spec.rb +55 -0
  167. data/spec/lib/zoom/actions/roles/get_spec.rb +37 -0
  168. data/spec/lib/zoom/actions/roles/list_spec.rb +28 -0
  169. data/spec/lib/zoom/actions/roles/members_spec.rb +35 -0
  170. data/spec/lib/zoom/actions/roles/unassign_spec.rb +34 -0
  171. data/spec/lib/zoom/actions/sip_audio/add_trunks_internal_callout_countries_spec.rb +25 -0
  172. data/spec/lib/zoom/actions/sip_audio/add_trunks_internal_numbers_spec.rb +25 -0
  173. data/spec/lib/zoom/actions/sip_audio/assign_numbers_spec.rb +29 -0
  174. data/spec/lib/zoom/actions/sip_audio/delete_internal_callout_countries_spec.rb +44 -0
  175. data/spec/lib/zoom/actions/sip_audio/delete_trunk_internal_numbers_spec.rb +44 -0
  176. data/spec/lib/zoom/actions/sip_audio/delete_trunk_numbers_spec.rb +44 -0
  177. data/spec/lib/zoom/actions/sip_audio/delete_trunks_spec.rb +44 -0
  178. data/spec/lib/zoom/actions/sip_audio/get_trunks_spec.rb +50 -0
  179. data/spec/lib/zoom/actions/sip_audio/list_trunk_numbers_spec.rb +46 -0
  180. data/spec/lib/zoom/actions/sip_audio/list_trunks_internal_callout_country_spec.rb +53 -0
  181. data/spec/lib/zoom/actions/sip_audio/list_trunks_internal_numbers_spec.rb +53 -0
  182. data/spec/lib/zoom/actions/token/access_token_spec.rb +26 -0
  183. data/spec/lib/zoom/actions/token/data_compliance_spec.rb +41 -0
  184. data/spec/lib/zoom/actions/token/refresh_token_spec.rb +26 -0
  185. data/spec/lib/zoom/actions/user/assistant/create_spec.rb +59 -0
  186. data/spec/lib/zoom/actions/user/assistant/delete_all_spec.rb +44 -0
  187. data/spec/lib/zoom/actions/user/assistant/delete_spec.rb +48 -1
  188. data/spec/lib/zoom/actions/user/assistant/list_spec.rb +53 -0
  189. data/spec/lib/zoom/actions/user/create_spec.rb +18 -46
  190. data/spec/lib/zoom/actions/user/email_check_spec.rb +43 -0
  191. data/spec/lib/zoom/actions/user/get_spec.rb +10 -1
  192. data/spec/lib/zoom/actions/user/list_recordings_spec.rb +57 -0
  193. data/spec/lib/zoom/actions/user/list_spec.rb +32 -1
  194. data/spec/lib/zoom/actions/user/permissions_spec.rb +52 -0
  195. data/spec/lib/zoom/actions/user/scheduler/delete_all_spec.rb +44 -0
  196. data/spec/lib/zoom/actions/user/scheduler/delete_spec.rb +50 -0
  197. data/spec/lib/zoom/actions/user/scheduler/list_spec.rb +53 -0
  198. data/spec/lib/zoom/actions/user/settings_update_spec.rb +50 -0
  199. data/spec/lib/zoom/actions/user/token_spec.rb +61 -0
  200. data/spec/lib/zoom/actions/user/update_email_spec.rb +59 -0
  201. data/spec/lib/zoom/actions/user/update_password_spec.rb +29 -0
  202. data/spec/lib/zoom/actions/user/update_status_spec.rb +59 -0
  203. data/spec/lib/zoom/actions/user/vanity_name_spec.rb +51 -0
  204. data/spec/lib/zoom/actions/webinar/panelist_list_spec.rb +44 -0
  205. data/spec/lib/zoom/actions/webinar/poll_get_spec.rb +47 -0
  206. data/spec/lib/zoom/actions/webinar/polls_list_spec.rb +44 -0
  207. data/spec/lib/zoom/actions_spec.rb +105 -0
  208. data/spec/lib/zoom/client_spec.rb +48 -1
  209. data/spec/lib/zoom/params_spec.rb +23 -3
  210. data/spec/lib/zoom/utils_spec.rb +13 -8
  211. data/spec/spec_helper.rb +15 -2
  212. data/zoom_rb.gemspec +1 -1
  213. metadata +321 -111
  214. data/lib/zoom/actions/group.rb +0 -8
  215. data/lib/zoom/actions/metrics.rb +0 -27
  216. data/lib/zoom/constants.rb +0 -103
  217. data/spec/fixtures/meeting/delete.json +0 -4
  218. data/spec/fixtures/meeting/end.json +0 -4
  219. data/spec/fixtures/meeting/live.json +0 -32
  220. data/spec/fixtures/meeting/register.json +0 -7
  221. data/spec/fixtures/meeting/update.json +0 -4
  222. data/spec/fixtures/metrics_crc.json +0 -105
  223. data/spec/fixtures/metrics_meetingdetail.json +0 -32
  224. data/spec/fixtures/recording_delete.json +0 -4
  225. data/spec/fixtures/recording_list.json +0 -51
  226. data/spec/fixtures/user/assistant/delete.json +0 -5
  227. data/spec/lib/zoom/actions/group/create_spec.rb +0 -3
  228. data/spec/lib/zoom/actions/group/get_spec.rb +0 -3
  229. data/spec/lib/zoom/actions/group/member/list_spec.rb +0 -3
  230. data/spec/lib/zoom/actions/meeting/end_spec.rb +0 -55
  231. data/spec/lib/zoom/actions/meeting/live_spec.rb +0 -43
  232. data/spec/lib/zoom/actions/meeting/register_spec.rb +0 -45
  233. data/spec/lib/zoom/actions/metrics/crc_spec.rb +0 -48
  234. data/spec/lib/zoom/actions/metrics/im_spec.rb +0 -3
  235. data/spec/lib/zoom/actions/metrics/meetingdetail_spec.rb +0 -51
  236. data/spec/lib/zoom/actions/metrics/meetings_spec.rb +0 -61
  237. data/spec/lib/zoom/actions/metrics/qos_spec.rb +0 -3
  238. data/spec/lib/zoom/actions/metrics/webinardetail_spec.rb +0 -3
  239. data/spec/lib/zoom/actions/metrics/webinars_spec.rb +0 -3
  240. data/spec/lib/zoom/actions/metrics/zoomroomdetail_spec.rb +0 -3
  241. data/spec/lib/zoom/actions/metrics/zoomrooms_spec.rb +0 -3
  242. data/spec/lib/zoom/actions/recording/delete_spec.rb +0 -52
  243. data/spec/lib/zoom/actions/recording/mc_list_spec.rb +0 -51
  244. data/spec/lib/zoom/actions/user/activate_spec.rb +0 -3
  245. data/spec/lib/zoom/actions/user/checkemail_spec.rb +0 -3
  246. data/spec/lib/zoom/actions/user/checkzpk_spec.rb +0 -3
  247. data/spec/lib/zoom/actions/user/deactivate_spec.rb +0 -3
  248. data/spec/lib/zoom/actions/user/revoketoken_spec.rb +0 -3
  249. data/spec/lib/zoom/actions/user/updatepassword_spec.rb +0 -3
  250. data/spec/lib/zoom/actions/webinar/panelists_spec.rb +0 -3
  251. data/spec/lib/zoom/actions/webinar/polls_spec.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efbf20752dce2d7796dd85203549f9147fb81f74c98b5f3317a2d2e3dde68ebb
4
- data.tar.gz: 7e71b22ccbe081f63521fea457a010c0ea48d53cbf307fee8d63e9df716b9500
3
+ metadata.gz: 6298bd85028abebb9ba4b82a23d22ddefeeca40d424cd71274c1696f20986d59
4
+ data.tar.gz: f312fbe762644b491bb9e51c56b500797f0e457edcc30d99235ba9859e56ede7
5
5
  SHA512:
6
- metadata.gz: f56ec4c5410d86eaa83a10c89ccd29e5d5732effa3203a79c1b3506ffd532abda14090f704f09ded594b5c14c33015a0a786304b8a243b6f561e4e584d2808a5
7
- data.tar.gz: 3d213b942fd24614dd323d4d2c45076b80cc6dfff483560cbc376630e8c046cfd443c7cfb2b86c7c6d6e04554496dfa6d92c0db565dc8335a17a5888bbc9d8ea
6
+ metadata.gz: 27314937fc73a8c099edd373160f062e05c1f02b3ab35955877f7cdd48cd645031165a4873f83cd6332e69f1c03eb9fd02e851036d8a1c46c8b01f358fe69406
7
+ data.tar.gz: 9317f1791b0f20c0a53ddc0fe7518aab7d3760b41f7a7fe81aa22d3a4a0785aab200dd0f478930cfa3e6b2271e78043c5f1b62dd7704f7dce8755ebee537f6a4
data/.circleci/config.yml CHANGED
@@ -9,7 +9,7 @@ jobs:
9
9
  CC_TEST_REPORTER_ID: c6c77975186cfe10e41d9548e9b4a4648f87b56cdbb70bd3896a5a58abf08421
10
10
  docker:
11
11
  # specify the version you desire here
12
- - image: circleci/ruby:2.5.1-node-browsers
12
+ - image: circleci/ruby:2.7-node-browsers
13
13
 
14
14
  # Specify service dependencies here if necessary
15
15
  # CircleCI maintains a library of pre-built images
data/CHANGELOG.md ADDED
@@ -0,0 +1,63 @@
1
+ # 1.0.2
2
+
3
+ ### Fixes:
4
+ * Fix meeting_recording_get endpoint.
5
+
6
+ # 1.0.1
7
+
8
+ ### Fixes:
9
+ * Fix OAuth requests in Zoom::Actions::Token.
10
+
11
+ # 1.0.0
12
+
13
+ The 1.0 release and a major refactor of all endpoint definitions.
14
+
15
+ ### Breaking Change
16
+ * The `user_create` endpoint now requires its arguments to match the actual Zoom API.
17
+ This is done to simplify the code and encourage consistency.
18
+ This means that instead of passing:
19
+ ```
20
+ {
21
+ action: 'create',
22
+ email: 'foo@bar.com',
23
+ type: 1,
24
+ first_name: 'Zoomie',
25
+ last_name: 'Userton',
26
+ password: 'testerino'
27
+ }
28
+ ```
29
+ You will instead have to pass:
30
+ ```
31
+ {
32
+ action: 'create',
33
+ user_info: {
34
+ email: 'foo@bar.com',
35
+ type: 1,
36
+ first_name: 'Zoomie',
37
+ last_name: 'Userton',
38
+ password: 'testerino'
39
+ }
40
+ }
41
+ ```
42
+ Zoom API reference for user creation: https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate
43
+
44
+ ### New features
45
+ * Greatly simplified new syntax when adding endpoints. This reduces repetition and makes it easier.
46
+ * On `user_settings_get`, permit `option` and `custom_query_fields`.
47
+ * Add `group_create` and `group_update`.
48
+
49
+ # 0.11.0
50
+
51
+ This is the first CHANGELOG entry.
52
+
53
+ ### New features:
54
+ * A lot of new endpoints
55
+
56
+ ### Fixes:
57
+ * Update README to say `require 'zoom'`
58
+ * Fix a typo in the README
59
+
60
+ ### Misc:
61
+ * Update gems
62
+ * Update bundler to 2.2
63
+ * Update Ruby to 2.7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zoom_rb (0.10.0)
4
+ zoom_rb (1.0.2)
5
5
  httparty (~> 0.13)
6
6
  json (>= 1.8)
7
7
  jwt
@@ -9,82 +9,112 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.5.2)
13
- public_suffix (>= 2.0.2, < 4.0)
14
- ast (2.4.0)
15
- coderay (1.1.2)
16
- crack (0.4.3)
17
- safe_yaml (~> 1.0.0)
18
- diff-lcs (1.3)
19
- docile (1.3.1)
20
- hashdiff (0.3.7)
21
- hint-rubocop_style (0.2.5)
22
- rubocop (>= 0.50.0)
23
- rubocop-rspec (>= 1.17.0)
24
- httparty (0.17.1)
12
+ activesupport (6.1.4)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
+ addressable (2.8.0)
19
+ public_suffix (>= 2.0.2, < 5.0)
20
+ ast (2.4.2)
21
+ byebug (11.1.3)
22
+ coderay (1.1.3)
23
+ concurrent-ruby (1.1.9)
24
+ crack (0.4.5)
25
+ rexml
26
+ diff-lcs (1.4.4)
27
+ docile (1.4.0)
28
+ hashdiff (1.0.1)
29
+ hint-rubocop_style (0.3.6)
30
+ rubocop (>= 0.78.0)
31
+ rubocop-performance (>= 1.3.0)
32
+ rubocop-rails (>= 2.0.0)
33
+ rubocop-rspec (>= 1.33.0)
34
+ httparty (0.20.0)
25
35
  mime-types (~> 3.0)
26
36
  multi_xml (>= 0.5.2)
27
- jaro_winkler (1.5.1)
28
- json (2.1.0)
29
- jwt (2.2.1)
30
- method_source (0.9.0)
31
- mime-types (3.3)
37
+ i18n (1.8.10)
38
+ concurrent-ruby (~> 1.0)
39
+ json (2.5.1)
40
+ jwt (2.3.0)
41
+ method_source (1.0.0)
42
+ mime-types (3.4.1)
32
43
  mime-types-data (~> 3.2015)
33
- mime-types-data (3.2019.1009)
44
+ mime-types-data (3.2022.0105)
45
+ minitest (5.14.4)
34
46
  multi_xml (0.6.0)
35
- parallel (1.12.1)
36
- parser (2.5.3.0)
37
- ast (~> 2.4.0)
38
- powerpack (0.1.2)
39
- pry (0.11.3)
40
- coderay (~> 1.1.0)
41
- method_source (~> 0.9.0)
42
- public_suffix (3.0.3)
47
+ parallel (1.20.1)
48
+ parser (3.0.2.0)
49
+ ast (~> 2.4.1)
50
+ pry (0.13.1)
51
+ coderay (~> 1.1)
52
+ method_source (~> 1.0)
53
+ pry-byebug (3.9.0)
54
+ byebug (~> 11.0)
55
+ pry (~> 0.13.0)
56
+ public_suffix (4.0.6)
57
+ rack (2.2.3)
43
58
  rainbow (3.0.0)
44
- rspec (3.8.0)
45
- rspec-core (~> 3.8.0)
46
- rspec-expectations (~> 3.8.0)
47
- rspec-mocks (~> 3.8.0)
48
- rspec-core (3.8.0)
49
- rspec-support (~> 3.8.0)
50
- rspec-expectations (3.8.2)
59
+ regexp_parser (2.1.1)
60
+ rexml (3.2.5)
61
+ rspec (3.10.0)
62
+ rspec-core (~> 3.10.0)
63
+ rspec-expectations (~> 3.10.0)
64
+ rspec-mocks (~> 3.10.0)
65
+ rspec-core (3.10.1)
66
+ rspec-support (~> 3.10.0)
67
+ rspec-expectations (3.10.1)
51
68
  diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.8.0)
53
- rspec-mocks (3.8.0)
69
+ rspec-support (~> 3.10.0)
70
+ rspec-mocks (3.10.2)
54
71
  diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.8.0)
56
- rspec-support (3.8.0)
72
+ rspec-support (~> 3.10.0)
73
+ rspec-support (3.10.2)
57
74
  rspec_junit_formatter (0.4.1)
58
75
  rspec-core (>= 2, < 4, != 2.12.0)
59
- rubocop (0.60.0)
60
- jaro_winkler (~> 1.5.1)
76
+ rubocop (1.18.3)
61
77
  parallel (~> 1.10)
62
- parser (>= 2.5, != 2.5.1.1)
63
- powerpack (~> 0.1)
78
+ parser (>= 3.0.0.0)
64
79
  rainbow (>= 2.2.2, < 4.0)
80
+ regexp_parser (>= 1.8, < 3.0)
81
+ rexml
82
+ rubocop-ast (>= 1.7.0, < 2.0)
65
83
  ruby-progressbar (~> 1.7)
66
- unicode-display_width (~> 1.4.0)
67
- rubocop-rspec (1.30.1)
68
- rubocop (>= 0.60.0)
69
- ruby-progressbar (1.10.0)
70
- safe_yaml (1.0.4)
84
+ unicode-display_width (>= 1.4.0, < 3.0)
85
+ rubocop-ast (1.8.0)
86
+ parser (>= 3.0.1.1)
87
+ rubocop-performance (1.11.4)
88
+ rubocop (>= 1.7.0, < 2.0)
89
+ rubocop-ast (>= 0.4.0)
90
+ rubocop-rails (2.11.3)
91
+ activesupport (>= 4.2.0)
92
+ rack (>= 1.1)
93
+ rubocop (>= 1.7.0, < 2.0)
94
+ rubocop-rspec (2.4.0)
95
+ rubocop (~> 1.0)
96
+ rubocop-ast (>= 1.1.0)
97
+ ruby-progressbar (1.11.0)
71
98
  simplecov (0.16.1)
72
99
  docile (~> 1.1)
73
100
  json (>= 1.8, < 3)
74
101
  simplecov-html (~> 0.10.0)
75
102
  simplecov-html (0.10.2)
76
- unicode-display_width (1.4.0)
77
- webmock (3.4.2)
103
+ tzinfo (2.0.4)
104
+ concurrent-ruby (~> 1.0)
105
+ unicode-display_width (2.0.0)
106
+ webmock (3.13.0)
78
107
  addressable (>= 2.3.6)
79
108
  crack (>= 0.3.2)
80
- hashdiff
109
+ hashdiff (>= 0.4.0, < 2.0.0)
110
+ zeitwerk (2.4.2)
81
111
 
82
112
  PLATFORMS
83
113
  ruby
84
114
 
85
115
  DEPENDENCIES
86
116
  hint-rubocop_style (~> 0)
87
- pry (~> 0)
117
+ pry-byebug
88
118
  rspec (~> 3.8)
89
119
  rspec_junit_formatter (~> 0.4.1)
90
120
  simplecov (~> 0.16.1)
@@ -92,4 +122,4 @@ DEPENDENCIES
92
122
  zoom_rb!
93
123
 
94
124
  BUNDLED WITH
95
- 1.17.2
125
+ 2.2.32
data/Makefile CHANGED
@@ -2,4 +2,4 @@ help:
2
2
  @echo "make console"
3
3
 
4
4
  console:
5
- irb -rubygems -I lib -r zoom.rb
5
+ irb -r rubygems -I lib -r zoom.rb
data/README.md CHANGED
@@ -18,11 +18,9 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- The Zoom API uses OAuth or JWT to [Authenticate](https://marketplace.zoom.us/docs/api-reference/Authentication) API request. By defaut, a JWT client will be used.
21
+ The Zoom API uses OAuth or JWT to [Authenticate](https://marketplace.zoom.us/docs/api-reference/Authentication) API request. By default, a JWT client will be used.
22
22
 
23
23
  ```ruby
24
- require 'zoom'
25
-
26
24
  Zoom.configure do |c|
27
25
  c.api_key = 'xxx'
28
26
  c.api_secret = 'xxx'
@@ -31,21 +29,37 @@ end
31
29
  zoom_client = Zoom.new
32
30
  ```
33
31
 
34
- To create an OAuth client, create the client directly
32
+ To create an OAuth flow you need to make a call to auth, then create the client directly from an access token.
33
+
34
+ First you need to get an auth_code externally from:
35
+ ```
36
+ https://zoom.us/oauth/authorize?response_type=code&client_id=7lstjKqdwjett_kwjwDSEQ&redirect_uri=https://yourapp.com
37
+ ```
38
+
39
+ Which will result in a redirect to your app with code in the url params
40
+
41
+ then use this code to get an access token and a refresh token.
42
+
43
+ ```ruby
44
+ auth = Zoom::Client::OAuth.new(auth_code: auth_code, redirect_uri: redirect_uri, timeout: 15).auth
45
+
46
+ zoom_client = Zoom::Client::OAuth.new(access_token: auth['access_token'], timeout: 15)
47
+ ```
35
48
 
49
+ You can also make a call to refresh with auth using an auth_token and a refresh_token
36
50
  ```ruby
37
- require 'zoom'
51
+ client = Zoom::Client::OAuth.new(auth_token: auth_token, refresh_token: refresh_token).auth
38
52
 
39
53
  zoom_client = Zoom::Client::OAuth.new(access_token: 'xxx', timeout: 15)
40
54
  ```
41
55
 
42
- With the client, access the API
56
+ With the zoom client, access the API
43
57
 
44
58
  ```ruby
45
59
  user_list = zoom_client.user_list
46
60
  user_list['users'].each do |user|
47
61
  user_id = user['id']
48
- puts zoom_client.meeting_list(host_id: user_id)
62
+ puts zoom_client.meeting_list(user_id: user_id)
49
63
  end
50
64
 
51
65
  begin
@@ -3,91 +3,33 @@
3
3
  module Zoom
4
4
  module Actions
5
5
  module Account
6
- def account_list(*args)
7
- params = Zoom::Params.new(Utils.extract_options!(args))
8
- params.permit(:page_size, :page_number)
9
- Utils.parse_response self.class.get("/accounts", query: params, headers: request_headers)
10
- end
6
+ extend Zoom::Actions
11
7
 
12
- def account_create(*args)
13
- # TODO: implement accounts_create
14
- # options = Utils.extract_options!(args)
15
- raise Zoom::NotImplemented, 'accounts_create is not yet implemented'
16
- end
8
+ get 'account_list', '/accounts',
9
+ permit: %i[page_size page_number]
17
10
 
18
- def account_get(*args)
19
- # TODO: implement account_get
20
- # options = Utils.extract_options!(args)
21
- raise Zoom::NotImplemented, 'account_get is not yet implemented'
22
- end
11
+ post 'account_create', '/accounts',
12
+ require: %i[first_name last_name email password],
13
+ permit: { options: %i[share_rc room_connectors share_mc meeting_connectors pay_mode] }
23
14
 
24
- def account_delete(*args)
25
- # TODO: implement account_delete
26
- # options = Utils.extract_options!(args)
27
- raise Zoom::NotImplemented, 'account_delete is not yet implemented'
28
- end
15
+ get 'account_get', '/accounts/:account_id'
29
16
 
30
- def account_options_update(*args)
31
- # TODO: implement account_options_update
32
- # options = Utils.extract_options!(args)
33
- raise Zoom::NotImplemented, 'account_options_update is not yet implemented'
34
- end
17
+ delete 'account_delete', '/accounts/:account_id'
35
18
 
36
- def account_settings_get(*args)
37
- params = Zoom::Params.new(Utils.extract_options!(args))
38
- params.require(:id)
39
- Utils.parse_response self.class.get("/accounts/#{params[:id]}/settings", query: params.except(:id), headers: request_headers)
40
- end
19
+ patch 'account_options_update', '/accounts/:account_id/options',
20
+ permit: %i[share_rc room_connectors share_mc meeting_connectors pay_mode]
41
21
 
42
- def account_settings_update(*args)
43
- # TODO: implement account_settings_update
44
- # options = Utils.extract_options!(args)
45
- raise Zoom::NotImplemented, 'account_settings_update is not yet implemented'
46
- end
22
+ get 'account_settings_get', '/accounts/:account_id/settings',
23
+ permit: :option
47
24
 
48
- # Billing related API Endpoints
25
+ patch 'account_settings_update', '/accounts/:account_id/settings',
26
+ permit: [:option, Zoom::Constants::Account::Settings::PERMITTED_KEYS]
49
27
 
50
- def account_billing_get(*args)
51
- # TODO: implement account_billing_get
52
- # options = Utils.extract_options!(args)
53
- raise Zoom::NotImplemented, 'account_billing_get is not yet implemented'
54
- end
28
+ get 'account_managed_domains', '/accounts/:account_id/managed_domains'
55
29
 
56
- def account_billing_update(*args)
57
- # TODO: implement account_billing_update
58
- # options = Utils.extract_options!(args)
59
- raise Zoom::NotImplemented, 'account_billing_update is not yet implemented'
60
- end
30
+ get 'account_get_locked_settings', '/accounts/:account_id/lock_settings'
61
31
 
62
- def account_plans_list(*args)
63
- # TODO: implement account_plans_list
64
- # options = Utils.extract_options!(args)
65
- raise Zoom::NotImplemented, 'account_plans_list is not yet implemented'
66
- end
67
-
68
- def some_method(*args)
69
- # TODO: implement some_method
70
- # options = Utils.extract_options!(args)
71
- raise Zoom::NotImplemented, 'some_method is not yet implemented'
72
- end
73
-
74
- def some_method(*args)
75
- # TODO: implement some_method
76
- # options = Utils.extract_options!(args)
77
- raise Zoom::NotImplemented, 'some_method is not yet implemented'
78
- end
79
-
80
- def some_method(*args)
81
- # TODO: implement some_method
82
- # options = Utils.extract_options!(args)
83
- raise Zoom::NotImplemented, 'some_method is not yet implemented'
84
- end
85
-
86
- def some_method(*args)
87
- # TODO: implement some_method
88
- # options = Utils.extract_options!(args)
89
- raise Zoom::NotImplemented, 'some_method is not yet implemented'
90
- end
32
+ get 'account_trusted_domains', '/accounts/:account_id/trusted_domains'
91
33
  end
92
34
  end
93
- end
35
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
5
+ module Billing
6
+ extend Zoom::Actions
7
+
8
+ get 'billing_get', '/accounts/:account_id/billing'
9
+
10
+ patch 'billing_update', '/accounts/:account_id/billing',
11
+ permit: %i[first_name last_name email phone_number address apt city state zip country]
12
+
13
+ get 'billing_plans_list', '/accounts/:account_id/plans'
14
+
15
+ get 'billing_plans_usage', '/accounts/:account_id/plans/usage'
16
+
17
+ post 'billing_plans_subscribe', '/accounts/:account_id/plans',
18
+ require: {
19
+ contact: %i[first_name last_name email phone_number address city state zip country],
20
+ plan_base: %i[type hosts]
21
+ },
22
+ permit: [
23
+ :plan_recording,
24
+ {
25
+ contact: %i[apt],
26
+ plan_zoom_rooms: %i[type hosts],
27
+ plan_room_connector: %i[type hosts],
28
+ plan_large_meeting: %i[type hosts],
29
+ plan_zoom_events: %i[type hosts],
30
+ plan_webinar: %i[type hosts],
31
+ plan_audio: %i[type tollfree_countries premium_countries callout_countries ddi_numbers],
32
+ plan_phone: {
33
+ plan_base: %i[type callout_countries],
34
+ plan_calling: %i[type hosts],
35
+ plan_number: %i[type hosts]
36
+ }
37
+ }
38
+ ]
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
5
+ module Dashboard
6
+ extend Zoom::Actions
7
+
8
+ get 'dashboard_crc', '/metrics/crc',
9
+ require: %i[from to]
10
+
11
+ get 'dashboard_meetings', '/metrics/meetings',
12
+ require: %i[from to],
13
+ permit: %i[next_page_token page_size type]
14
+
15
+ get 'dashboard_meeting_details', '/metrics/meetings/:meeting_id',
16
+ permit: :type
17
+
18
+ get 'dashboard_meeting_participants', '/metrics/meetings/:meeting_id/participants',
19
+ permit: %i[next_page_token page_size type]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
5
+ module Groups
6
+ extend Zoom::Actions
7
+
8
+ get 'groups_list', '/groups'
9
+
10
+ get 'groups_get', '/groups/:group_id'
11
+
12
+ post 'group_create', '/groups',
13
+ permit: :name
14
+
15
+ patch 'group_update', '/groups/:group_id',
16
+ permit: :name
17
+ end
18
+ end
19
+ end
@@ -4,23 +4,22 @@ module Zoom
4
4
  module Actions
5
5
  module IM
6
6
  module Chat
7
+ extend Zoom::Actions
8
+
9
+ get 'get_chat_channels', '/chat/channels/:channel_id'
10
+
11
+ get 'get_chat_user_channels', '/chat/users/:user_id/channels',
12
+ permit: %i[next_page_token page_size]
13
+
7
14
  # Get chat messages for a specified period.
8
- def chat_get(*args)
9
- options = Utils.extract_options!(args)
10
- Zoom::Params.new(options).require(:access_token, :session_id, :from, :to)
11
- # TODO handle date format for `from` and `to` params
12
- # TODO implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
13
- Utils.parse_response self.class.post('/chat/get', query: options)
14
- end
15
+ # TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
16
+ get 'chat_get', '/chat/get',
17
+ require: [ :access_token, :session_id, :from, :to ]
15
18
 
16
19
  # Get chat history list for a specified time period.
17
- def chat_list(*args)
18
- options = Utils.extract_options!(args)
19
- Zoom::Params.new(options).require(:access_token, :from, :to)
20
- # TODO handle date format for `from` and `to` params
21
- # TODO implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
22
- Utils.parse_response self.class.post('/chat/list', query: options)
23
- end
20
+ # TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
21
+ get 'chat_list', '/chat/list',
22
+ require: [ :access_token, :from, :to ]
24
23
  end
25
24
  end
26
25
  end