zoom_rb 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -1
  3. data/CHANGELOG.md +15 -0
  4. data/Gemfile.lock +83 -53
  5. data/Makefile +1 -1
  6. data/README.md +22 -4
  7. data/lib/zoom/actions/account.rb +33 -58
  8. data/lib/zoom/actions/billing.rb +38 -0
  9. data/lib/zoom/actions/dashboard.rb +33 -0
  10. data/lib/zoom/actions/groups.rb +17 -0
  11. data/lib/zoom/actions/im/chat.rb +16 -4
  12. data/lib/zoom/actions/meeting.rb +48 -40
  13. data/lib/zoom/actions/phone.rb +27 -0
  14. data/lib/zoom/actions/recording.rb +25 -16
  15. data/lib/zoom/actions/report.rb +9 -34
  16. data/lib/zoom/actions/roles.rb +41 -0
  17. data/lib/zoom/actions/sip_audio.rb +75 -0
  18. data/lib/zoom/actions/token.rb +35 -0
  19. data/lib/zoom/actions/user.rb +50 -64
  20. data/lib/zoom/actions/webinar.rb +33 -40
  21. data/lib/zoom/client.rb +27 -7
  22. data/lib/zoom/clients/oauth.rb +46 -3
  23. data/lib/zoom/constants/account/options/pay_modes.rb +12 -0
  24. data/lib/zoom/constants/account/settings/permitted_settings.rb +125 -0
  25. data/lib/zoom/constants/constants.rb +35 -0
  26. data/lib/zoom/constants/meeting/approval_types.rb +11 -0
  27. data/lib/zoom/constants/meeting/audio_type.rb +11 -0
  28. data/lib/zoom/constants/meeting/auto_recording.rb +11 -0
  29. data/lib/zoom/constants/meeting/registration_types.rb +11 -0
  30. data/lib/zoom/constants/meeting/types.rb +12 -0
  31. data/lib/zoom/constants/recurrence/monthly_weeks.rb +13 -0
  32. data/lib/zoom/constants/recurrence/types.rb +11 -0
  33. data/lib/zoom/constants/recurrence/weekly_days.rb +15 -0
  34. data/lib/zoom/constants/user/create_types.rb +12 -0
  35. data/lib/zoom/constants/user/types.rb +11 -0
  36. data/lib/zoom/constants/webinar/approval_types.rb +11 -0
  37. data/lib/zoom/constants/webinar/audio_type.rb +11 -0
  38. data/lib/zoom/constants/webinar/auto_recording.rb +11 -0
  39. data/lib/zoom/constants/webinar/registration_types.rb +11 -0
  40. data/lib/zoom/constants/webinar/types.rb +11 -0
  41. data/lib/zoom/error.rb +9 -1
  42. data/lib/zoom/params.rb +51 -12
  43. data/lib/zoom/utils.rb +13 -8
  44. data/lib/zoom/version.rb +2 -2
  45. data/lib/{zoom.rb → zoom_rb.rb} +8 -3
  46. data/spec/fixtures/account/create.json +6 -0
  47. data/spec/{lib/zoom/actions/report/hosts_report_spec.rb → fixtures/account/delete.json} +0 -0
  48. data/spec/fixtures/account/get.json +13 -0
  49. data/spec/fixtures/account/managed_domains.json +7 -0
  50. data/spec/fixtures/account/options_update.json +7 -0
  51. data/spec/fixtures/account/settings_get.json +1 -1
  52. data/spec/{lib/zoom/actions/report/meeting_polls_report_spec.rb → fixtures/account/settings_update.json} +0 -0
  53. data/spec/fixtures/account/trusted_domains.json +3 -0
  54. data/spec/fixtures/billing/get.json +12 -0
  55. data/spec/fixtures/billing/plans_list.json +44 -0
  56. data/spec/fixtures/billing/plans_subscribe.json +30 -0
  57. data/spec/fixtures/billing/plans_usage.json +30 -0
  58. data/spec/{lib/zoom/actions/report/meetings_report_spec.rb → fixtures/billing/update.json} +0 -0
  59. data/spec/fixtures/chat/channels/get.json +5 -0
  60. data/spec/fixtures/chat/users/channels/list.json +17 -0
  61. data/spec/fixtures/dashboard/crc.json +104 -0
  62. data/spec/fixtures/dashboard/meeting/detail.json +20 -0
  63. data/spec/fixtures/dashboard/meeting/participants.json +56 -0
  64. data/spec/fixtures/{metrics_meetings.json → dashboard/meetings.json} +1 -2
  65. data/spec/fixtures/error/channel_not_found.json +4 -0
  66. data/spec/fixtures/error/group_does_not_exist.json +4 -0
  67. data/spec/fixtures/error/group_not_belong_to_account.json +4 -0
  68. data/spec/fixtures/error/meeting_not_exist.json +4 -0
  69. data/spec/fixtures/error/next_page_token_invalid.json +4 -0
  70. data/spec/fixtures/error/unauthorized_request.json +4 -0
  71. data/spec/fixtures/error/user_not_exist.json +1 -1
  72. data/spec/fixtures/groups/get.json +5 -0
  73. data/spec/fixtures/groups/list.json +15 -0
  74. data/spec/fixtures/meeting/add_registrant.json +7 -0
  75. data/spec/fixtures/meeting/create.json +31 -16
  76. data/spec/fixtures/meeting/get.json +43 -33
  77. data/spec/fixtures/meeting/invitation.json +3 -0
  78. data/spec/fixtures/meeting/live_stream/errors/meeting_not_found.json +4 -0
  79. data/spec/fixtures/meeting/live_stream/errors/missing_field.json +10 -0
  80. data/spec/fixtures/{recording_get.json → recording/get.json} +17 -6
  81. data/spec/fixtures/recording/list.json +53 -0
  82. data/spec/fixtures/recording/settings/get.json +7 -0
  83. data/spec/fixtures/report/meeting.json +19 -0
  84. data/spec/fixtures/report/meeting/participants.json +17 -0
  85. data/spec/fixtures/roles/assign.json +4 -0
  86. data/spec/fixtures/roles/create.json +9 -0
  87. data/spec/fixtures/roles/get.json +11 -0
  88. data/spec/fixtures/roles/list.json +29 -0
  89. data/spec/fixtures/roles/members.json +15 -0
  90. data/spec/fixtures/sip_audio/sip_trunks_get.json +19 -0
  91. data/spec/fixtures/sip_audio/sip_trunks_internal_callout_countries_add.json +10 -0
  92. data/spec/fixtures/sip_audio/sip_trunks_internal_callout_country_list.json +15 -0
  93. data/spec/fixtures/sip_audio/sip_trunks_internal_numbers_add.json +14 -0
  94. data/spec/fixtures/sip_audio/sip_trunks_internal_numbers_list.json +16 -0
  95. data/spec/fixtures/sip_audio/sip_trunks_numbers_assign.json +7 -0
  96. data/spec/fixtures/sip_audio/sip_trunks_numbers_list.json +9 -0
  97. data/spec/fixtures/token/access_token.json +7 -0
  98. data/spec/fixtures/token/data_compliance.json +8 -0
  99. data/spec/fixtures/token/refresh_token.json +7 -0
  100. data/spec/fixtures/user/assistant/create.json +4 -0
  101. data/spec/fixtures/user/assistant/list.json +8 -0
  102. data/spec/fixtures/user/email_check.json +3 -0
  103. data/spec/fixtures/user/get.json +35 -21
  104. data/spec/fixtures/user/list.json +17 -13
  105. data/spec/fixtures/user/permissions.json +65 -0
  106. data/spec/fixtures/user/recording/list.json +50 -0
  107. data/spec/fixtures/user/scheduler/list.json +12 -0
  108. data/spec/fixtures/user/token.json +3 -0
  109. data/spec/{lib/zoom/actions/report/telephone_report_spec.rb → fixtures/user/update_password.json} +0 -0
  110. data/spec/fixtures/user/vanity_name.json +3 -0
  111. data/spec/fixtures/webinar/panelist_list.json +12 -0
  112. data/spec/fixtures/webinar/poll_get.json +13 -0
  113. data/spec/fixtures/webinar/polls_list.json +16 -0
  114. data/spec/lib/zoom/actions/account/create_spec.rb +68 -0
  115. data/spec/lib/zoom/actions/account/delete_spec.rb +44 -0
  116. data/spec/lib/zoom/actions/account/get_locked_settings_spec.rb +43 -0
  117. data/spec/lib/zoom/actions/account/get_spec.rb +43 -0
  118. data/spec/lib/zoom/actions/account/managed_domains_spec.rb +43 -0
  119. data/spec/lib/zoom/actions/account/options_update_spec.rb +58 -0
  120. data/spec/lib/zoom/actions/account/settings_get_spec.rb +5 -5
  121. data/spec/lib/zoom/actions/account/settings_update_spec.rb +55 -0
  122. data/spec/lib/zoom/actions/account/trusted_domains_spec.rb +43 -0
  123. data/spec/lib/zoom/actions/billing/get_spec.rb +48 -0
  124. data/spec/lib/zoom/actions/billing/plans_list_spec.rb +48 -0
  125. data/spec/lib/zoom/actions/billing/plans_subscribe_spec.rb +69 -0
  126. data/spec/lib/zoom/actions/billing/plans_usage_spec.rb +48 -0
  127. data/spec/lib/zoom/actions/billing/update_spec.rb +64 -0
  128. data/spec/lib/zoom/actions/dashboard/crc_spec.rb +33 -0
  129. data/spec/lib/zoom/actions/dashboard/meeting_details_spec.rb +62 -0
  130. data/spec/lib/zoom/actions/dashboard/meeting_participants_spec.rb +74 -0
  131. data/spec/lib/zoom/actions/dashboard/meetings_spec.rb +63 -0
  132. data/spec/lib/zoom/actions/{group → groups}/create_spec.rb +0 -0
  133. data/spec/lib/zoom/actions/{group → groups}/delete_spec.rb +0 -0
  134. data/spec/lib/zoom/actions/{group → groups}/edit_spec.rb +0 -0
  135. data/spec/lib/zoom/actions/groups/get_spec.rb +62 -0
  136. data/spec/lib/zoom/actions/groups/list_spec.rb +47 -0
  137. data/spec/lib/zoom/actions/{group → groups}/member/add_spec.rb +0 -0
  138. data/spec/lib/zoom/actions/{group → groups}/member/delete_spec.rb +0 -0
  139. data/spec/lib/zoom/actions/{group → groups/member}/list_spec.rb +0 -0
  140. data/spec/lib/zoom/actions/im/chat/channels/get_spec.rb +64 -0
  141. data/spec/lib/zoom/actions/im/chat/users/channels/get_spec.rb +45 -0
  142. data/spec/lib/zoom/actions/meeting/add_registrant_spec.rb +30 -0
  143. data/spec/lib/zoom/actions/meeting/create_spec.rb +13 -13
  144. data/spec/lib/zoom/actions/meeting/delete_spec.rb +17 -34
  145. data/spec/lib/zoom/actions/meeting/get_spec.rb +21 -31
  146. data/spec/lib/zoom/actions/meeting/invitation_spec.rb +48 -0
  147. data/spec/lib/zoom/actions/meeting/livestream_spec.rb +61 -0
  148. data/spec/lib/zoom/actions/meeting/update_spec.rb +48 -42
  149. data/spec/lib/zoom/actions/recording/file_delete_spec.rb +33 -0
  150. data/spec/lib/zoom/actions/recording/get_spec.rb +19 -35
  151. data/spec/lib/zoom/actions/recording/list_spec.rb +20 -26
  152. data/spec/lib/zoom/actions/recording/settings/get_spec.rb +42 -0
  153. data/spec/lib/zoom/actions/recording/settings/update_spec.rb +32 -0
  154. data/spec/lib/zoom/actions/report/meeting_details_report_spec.rb +44 -0
  155. data/spec/lib/zoom/actions/report/meeting_participants_report_spec.rb +44 -0
  156. data/spec/lib/zoom/actions/roles/assign_spec.rb +25 -0
  157. data/spec/lib/zoom/actions/roles/create_spec.rb +55 -0
  158. data/spec/lib/zoom/actions/roles/get_spec.rb +37 -0
  159. data/spec/lib/zoom/actions/roles/list_spec.rb +28 -0
  160. data/spec/lib/zoom/actions/roles/members_spec.rb +35 -0
  161. data/spec/lib/zoom/actions/roles/unassign_spec.rb +34 -0
  162. data/spec/lib/zoom/actions/sip_audio/add_trunks_internal_callout_countries_spec.rb +25 -0
  163. data/spec/lib/zoom/actions/sip_audio/add_trunks_internal_numbers_spec.rb +25 -0
  164. data/spec/lib/zoom/actions/sip_audio/assign_numbers_spec.rb +29 -0
  165. data/spec/lib/zoom/actions/sip_audio/delete_internal_callout_countries_spec.rb +44 -0
  166. data/spec/lib/zoom/actions/sip_audio/delete_trunk_internal_numbers_spec.rb +44 -0
  167. data/spec/lib/zoom/actions/sip_audio/delete_trunk_numbers_spec.rb +44 -0
  168. data/spec/lib/zoom/actions/sip_audio/delete_trunks_spec.rb +44 -0
  169. data/spec/lib/zoom/actions/sip_audio/get_trunks_spec.rb +50 -0
  170. data/spec/lib/zoom/actions/sip_audio/list_trunk_numbers_spec.rb +46 -0
  171. data/spec/lib/zoom/actions/sip_audio/list_trunks_internal_callout_country_spec.rb +53 -0
  172. data/spec/lib/zoom/actions/sip_audio/list_trunks_internal_numbers_spec.rb +53 -0
  173. data/spec/lib/zoom/actions/token/access_token_spec.rb +26 -0
  174. data/spec/lib/zoom/actions/token/data_compliance_spec.rb +41 -0
  175. data/spec/lib/zoom/actions/token/refresh_token_spec.rb +26 -0
  176. data/spec/lib/zoom/actions/user/assistant/create_spec.rb +59 -0
  177. data/spec/lib/zoom/actions/user/assistant/delete_all_spec.rb +44 -0
  178. data/spec/lib/zoom/actions/user/assistant/delete_spec.rb +48 -1
  179. data/spec/lib/zoom/actions/user/assistant/list_spec.rb +53 -0
  180. data/spec/lib/zoom/actions/user/email_check_spec.rb +43 -0
  181. data/spec/lib/zoom/actions/user/get_spec.rb +10 -1
  182. data/spec/lib/zoom/actions/user/list_recordings_spec.rb +57 -0
  183. data/spec/lib/zoom/actions/user/list_spec.rb +32 -1
  184. data/spec/lib/zoom/actions/user/permissions_spec.rb +52 -0
  185. data/spec/lib/zoom/actions/user/scheduler/delete_all_spec.rb +44 -0
  186. data/spec/lib/zoom/actions/user/scheduler/delete_spec.rb +50 -0
  187. data/spec/lib/zoom/actions/user/scheduler/list_spec.rb +53 -0
  188. data/spec/lib/zoom/actions/user/settings_update_spec.rb +50 -0
  189. data/spec/lib/zoom/actions/user/token_spec.rb +61 -0
  190. data/spec/lib/zoom/actions/user/update_password_spec.rb +29 -0
  191. data/spec/lib/zoom/actions/user/vanity_name_spec.rb +51 -0
  192. data/spec/lib/zoom/actions/webinar/panelist_list_spec.rb +44 -0
  193. data/spec/lib/zoom/actions/webinar/poll_get_spec.rb +47 -0
  194. data/spec/lib/zoom/actions/webinar/polls_list_spec.rb +44 -0
  195. data/spec/lib/zoom/client_spec.rb +48 -1
  196. data/spec/lib/zoom/params_spec.rb +23 -3
  197. data/spec/lib/zoom/utils_spec.rb +12 -7
  198. data/spec/spec_helper.rb +15 -2
  199. data/zoom_rb.gemspec +1 -1
  200. metadata +295 -108
  201. data/lib/zoom/actions/group.rb +0 -8
  202. data/lib/zoom/actions/metrics.rb +0 -27
  203. data/lib/zoom/constants.rb +0 -103
  204. data/spec/fixtures/meeting/delete.json +0 -4
  205. data/spec/fixtures/meeting/end.json +0 -4
  206. data/spec/fixtures/meeting/live.json +0 -32
  207. data/spec/fixtures/meeting/register.json +0 -7
  208. data/spec/fixtures/meeting/update.json +0 -4
  209. data/spec/fixtures/metrics_crc.json +0 -105
  210. data/spec/fixtures/metrics_meetingdetail.json +0 -32
  211. data/spec/fixtures/recording_delete.json +0 -4
  212. data/spec/fixtures/recording_list.json +0 -51
  213. data/spec/fixtures/user/assistant/delete.json +0 -5
  214. data/spec/lib/zoom/actions/group/get_spec.rb +0 -3
  215. data/spec/lib/zoom/actions/group/member/list_spec.rb +0 -3
  216. data/spec/lib/zoom/actions/meeting/end_spec.rb +0 -55
  217. data/spec/lib/zoom/actions/meeting/live_spec.rb +0 -43
  218. data/spec/lib/zoom/actions/meeting/register_spec.rb +0 -45
  219. data/spec/lib/zoom/actions/metrics/crc_spec.rb +0 -48
  220. data/spec/lib/zoom/actions/metrics/im_spec.rb +0 -3
  221. data/spec/lib/zoom/actions/metrics/meetingdetail_spec.rb +0 -51
  222. data/spec/lib/zoom/actions/metrics/meetings_spec.rb +0 -61
  223. data/spec/lib/zoom/actions/metrics/qos_spec.rb +0 -3
  224. data/spec/lib/zoom/actions/metrics/webinardetail_spec.rb +0 -3
  225. data/spec/lib/zoom/actions/metrics/webinars_spec.rb +0 -3
  226. data/spec/lib/zoom/actions/metrics/zoomroomdetail_spec.rb +0 -3
  227. data/spec/lib/zoom/actions/metrics/zoomrooms_spec.rb +0 -3
  228. data/spec/lib/zoom/actions/recording/delete_spec.rb +0 -52
  229. data/spec/lib/zoom/actions/recording/mc_list_spec.rb +0 -51
  230. data/spec/lib/zoom/actions/report/webinar_details_report_spec.rb +0 -0
  231. data/spec/lib/zoom/actions/report/webinar_polls_report_spec.rb +0 -0
  232. data/spec/lib/zoom/actions/report/webinar_qa_report_spec.rb +0 -0
  233. data/spec/lib/zoom/actions/user/activate_spec.rb +0 -3
  234. data/spec/lib/zoom/actions/user/checkemail_spec.rb +0 -3
  235. data/spec/lib/zoom/actions/user/checkzpk_spec.rb +0 -3
  236. data/spec/lib/zoom/actions/user/deactivate_spec.rb +0 -3
  237. data/spec/lib/zoom/actions/user/revoketoken_spec.rb +0 -3
  238. data/spec/lib/zoom/actions/user/updatepassword_spec.rb +0 -3
  239. data/spec/lib/zoom/actions/webinar/panelists_spec.rb +0 -3
  240. 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: b1cd08a56da2851062cd381b62c75bc0fe3b5c1c809699fd6fa19e268799009c
4
+ data.tar.gz: 0a3b24e1e9c460d226590fac97a1c9a7af199ac2db72f85e68ceab3e38527f61
5
5
  SHA512:
6
- metadata.gz: f56ec4c5410d86eaa83a10c89ccd29e5d5732effa3203a79c1b3506ffd532abda14090f704f09ded594b5c14c33015a0a786304b8a243b6f561e4e584d2808a5
7
- data.tar.gz: 3d213b942fd24614dd323d4d2c45076b80cc6dfff483560cbc376630e8c046cfd443c7cfb2b86c7c6d6e04554496dfa6d92c0db565dc8335a17a5888bbc9d8ea
6
+ metadata.gz: 95585d7404c4473f0822e208f4cf517752933331c2f3fbc55fdd3658b11ce8511a572dd5ae2aff83aca9c8f27482f79a461284fe6f053ab42e9477def1b40f56
7
+ data.tar.gz: 5c871ea816c82b7ce03111988317c2b47a4334381902827b376d8ecf84aa220e401bd6be1c82d6ffd5632006d2abd144a2286612f123209a91d4e1f225f7680b
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,15 @@
1
+ # 0.11.0
2
+
3
+ This is the first CHANGELOG entry.
4
+
5
+ ### New features:
6
+ * A lot of new endpoints
7
+
8
+ ### Fixes:
9
+ * Update README to say `require 'zoom'`
10
+ * Fix a typo in the README
11
+
12
+ ### Misc:
13
+ * Update gems
14
+ * Update bundler to 2.2
15
+ * 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 (0.11.0)
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.18.1)
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.2.3)
41
+ method_source (1.0.0)
42
+ mime-types (3.3.1)
32
43
  mime-types-data (~> 3.2015)
33
- mime-types-data (3.2019.1009)
44
+ mime-types-data (3.2021.0704)
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.24
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,7 +18,7 @@ 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
24
  require 'zoom'
@@ -31,21 +31,39 @@ end
31
31
  zoom_client = Zoom.new
32
32
  ```
33
33
 
34
- To create an OAuth client, create the client directly
34
+ To create an OAuth flow you need to make a call to auth, then create the client directly from an access token.
35
+
36
+ First you need to get an auth_code externally from:
37
+ ```
38
+ https://zoom.us/oauth/authorize?response_type=code&client_id=7lstjKqdwjett_kwjwDSEQ&redirect_uri=https://yourapp.com
39
+ ```
40
+
41
+ Which will result in a redirect to your app with code in the url params
42
+
43
+ then use this code to get an access token and a refresh token.
35
44
 
36
45
  ```ruby
37
46
  require 'zoom'
38
47
 
48
+ auth = Zoom::Client::OAuth.new(auth_code: auth_code, redirect_uri: redirect_uri, timeout: 15).auth
49
+
50
+ zoom_client = Zoom::Client::OAuth.new(access_token: auth['access_token'], timeout: 15)
51
+ ```
52
+
53
+ You can also make a call to refresh with auth using an auth_token and a refresh_token
54
+ ```ruby
55
+ client = Zoom::Client::OAuth.new(auth_token: auth_token, refresh_token: refresh_token).auth
56
+
39
57
  zoom_client = Zoom::Client::OAuth.new(access_token: 'xxx', timeout: 15)
40
58
  ```
41
59
 
42
- With the client, access the API
60
+ With the zoom client, access the API
43
61
 
44
62
  ```ruby
45
63
  user_list = zoom_client.user_list
46
64
  user_list['users'].each do |user|
47
65
  user_id = user['id']
48
- puts zoom_client.meeting_list(host_id: user_id)
66
+ puts zoom_client.meeting_list(user_id: user_id)
49
67
  end
50
68
 
51
69
  begin
@@ -5,89 +5,64 @@ module Zoom
5
5
  module Account
6
6
  def account_list(*args)
7
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)
8
+ params.permit(%i[page_size page_number])
9
+ Utils.parse_response self.class.get('/accounts', query: params, headers: request_headers)
10
10
  end
11
11
 
12
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'
13
+ params = Zoom::Params.new(Utils.extract_options!(args))
14
+ params.require(%i[first_name last_name email password]).permit(options: %i[share_rc room_connectors share_mc meeting_connectors pay_mode])
15
+ Utils.parse_response self.class.post('/accounts', body: params.to_json, headers: request_headers)
16
16
  end
17
17
 
18
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'
19
+ params = Zoom::Params.new(Utils.extract_options!(args))
20
+ params.require(:account_id)
21
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}", headers: request_headers)
22
22
  end
23
23
 
24
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'
25
+ params = Zoom::Params.new(Utils.extract_options!(args))
26
+ params.require(:account_id)
27
+ Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}", headers: request_headers)
28
28
  end
29
29
 
30
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'
31
+ params = Zoom::Params.new(Utils.extract_options!(args))
32
+ params.require(:account_id).permit(%i[share_rc room_connectors share_mc meeting_connectors pay_mode])
33
+ Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/options", body: params.except(:account_id).to_json, headers: request_headers)
34
34
  end
35
35
 
36
36
  def account_settings_get(*args)
37
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)
38
+ params.require(:account_id).permit(:option)
39
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/settings", query: params.except(:account_id), headers: request_headers)
40
40
  end
41
41
 
42
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
47
-
48
- # Billing related API Endpoints
49
-
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
55
-
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
61
-
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'
43
+ params = Zoom::Params.new(Utils.extract_options!(args))
44
+ params.require(:account_id).permit(:option, Zoom::Constants::Account::Settings::PERMITTED_KEYS)
45
+ params.permit_value(:option, Zoom::Constants::Account::Settings::PERMITTED_OPTIONS)
46
+ Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/settings", query: params.slice(:option), body: params.except(%i[account_id option]).to_json, headers: request_headers)
72
47
  end
73
48
 
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'
49
+ def account_managed_domains(*args)
50
+ params = Zoom::Params.new(Utils.extract_options!(args))
51
+ params.require(:account_id)
52
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/managed_domains", headers: request_headers)
78
53
  end
79
54
 
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'
55
+ def account_get_locked_settings(*args)
56
+ params = Zoom::Params.new(Utils.extract_options!(args))
57
+ params.require(:account_id)
58
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/lock_settings", headers: request_headers)
84
59
  end
85
60
 
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'
61
+ def account_trusted_domains(*args)
62
+ params = Zoom::Params.new(Utils.extract_options!(args))
63
+ params.require(:account_id)
64
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/trusted_domains", headers: request_headers)
90
65
  end
91
66
  end
92
67
  end
93
- end
68
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
5
+ module Billing
6
+ def billing_get(*args)
7
+ params = Zoom::Params.new(Utils.extract_options!(args))
8
+ params.require(:account_id)
9
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/billing", headers: request_headers)
10
+ end
11
+
12
+ def billing_update(*args)
13
+ params = Zoom::Params.new(Utils.extract_options!(args))
14
+ params.require(:account_id).permit(%i[first_name last_name email phone_number address apt city state zip country])
15
+ Utils.parse_response self.class.patch("/accounts/#{params[:account_id]}/billing", body: params.except(:account_id).to_json, headers: request_headers)
16
+ end
17
+
18
+ def billing_plans_list(*args)
19
+ params = Zoom::Params.new(Utils.extract_options!(args))
20
+ params.require(:account_id)
21
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/plans", headers: request_headers)
22
+ end
23
+
24
+ def billing_plans_usage(*args)
25
+ params = Zoom::Params.new(Utils.extract_options!(args))
26
+ params.require(:account_id)
27
+ Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/plans/usage", headers: request_headers)
28
+ end
29
+
30
+ def billing_plans_subscribe(*args)
31
+ params = Zoom::Params.new(Utils.extract_options!(args))
32
+ # TODO: Move to constants and do some data validation
33
+ params.require(:account_id, contact: %i[first_name last_name email phone_number address city state zip country], plan_base: %i[type hosts]).permit(:plan_recording, contact: [:apt], plan_zoom_rooms: %i[type hosts], plan_room_connector: %i[type hosts], plan_large_meeting: [], plan_webinar: [], plan_audio: %i[type tollfree_countries premium_countries callout_countries ddi_numbers], plan_phone: { plan_base: %i[type hosts], plan_calling: [], plan_number: [] })
34
+ Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/plans", body: params.except(:account_id).to_json, headers: request_headers)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
5
+ module Dashboard
6
+ def dashboard_crc(*args)
7
+ params = Zoom::Params.new(Utils.extract_options!(args))
8
+ params.require(%i[from to])
9
+ Utils.process_datetime_params!(%i[from to], params)
10
+ Utils.parse_response self.class.get('/metrics/crc', query: params, headers: request_headers)
11
+ end
12
+
13
+ def dashboard_meetings(*args)
14
+ params = Zoom::Params.new(Utils.extract_options!(args))
15
+ params.require(%i[from to]).permit(%i[next_page_token page_size type])
16
+ Utils.process_datetime_params!(%i[from to], params)
17
+ Utils.parse_response self.class.get('/metrics/meetings', query: params, headers: request_headers)
18
+ end
19
+
20
+ def dashboard_meeting_details(*args)
21
+ params = Zoom::Params.new(Utils.extract_options!(args))
22
+ params.require(:meeting_id).permit(:type)
23
+ Utils.parse_response self.class.get("/metrics/meetings/#{params[:meeting_id]}", query: params.except(:meeting_id), headers: request_headers)
24
+ end
25
+
26
+ def dashboard_meeting_participants(*args)
27
+ params = Zoom::Params.new(Utils.extract_options!(args))
28
+ params.require(:meeting_id).permit(%i[next_page_token page_size type])
29
+ Utils.parse_response self.class.get("/metrics/meetings/#{params[:meeting_id]}/participants", query: params.except(:meeting_id), headers: request_headers)
30
+ end
31
+ end
32
+ end
33
+ end