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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 04b2d3dff30acc1ebab91979d26cea973ce443bb591d62f7651838ba44ce8779
4
+ data.tar.gz: ff0b4ab5c215032f5144095ea882c8a60af308e0d82fe63908531261526a02b3
5
+ SHA512:
6
+ metadata.gz: 41df4b44c25f65354106a1a41db57db8f01b21ba4c29f6ca02c7d06bd1dcaacef29995123620d388926c9b0bc6181933b1abdf657d2aa3ca3b9799c6188a7dd9
7
+ data.tar.gz: 62501ed89a36e466ef141090904db20662789a7769b4d1a0472797c244dcd8d7b435f2c432f9be4da4857aeb960194e6002141b10d4dafe6a40bf39546924453
@@ -0,0 +1,66 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ environment:
9
+ CC_TEST_REPORTER_ID: c6c77975186cfe10e41d9548e9b4a4648f87b56cdbb70bd3896a5a58abf08421
10
+ docker:
11
+ # specify the version you desire here
12
+ - image: circleci/ruby:2.5.1-node-browsers
13
+
14
+ # Specify service dependencies here if necessary
15
+ # CircleCI maintains a library of pre-built images
16
+ # documented at https://circleci.com/docs/2.0/circleci-images/
17
+ # - image: circleci/postgres:9.4
18
+
19
+ working_directory: ~/repo
20
+
21
+ steps:
22
+ - checkout
23
+
24
+ # Download and cache dependencies
25
+ - restore_cache:
26
+ keys:
27
+ - zoom-bundle-{{ checksum "Gemfile.lock" }}
28
+ # fallback to using the latest cache if no exact match is found
29
+ - zoom-bundle-
30
+
31
+ - run:
32
+ name: install dependencies
33
+ command: |
34
+ bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle
35
+
36
+ - save_cache:
37
+ paths:
38
+ - ./vendor/bundle
39
+ key: zoom-bundle-{{ checksum "Gemfile.lock" }}
40
+
41
+ - run:
42
+ name: Setup Code Climate test-reporter
43
+ command: |
44
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
45
+ chmod +x ./cc-test-reporter
46
+
47
+ - run:
48
+ name: run tests
49
+ command: |
50
+ mkdir /tmp/test-results
51
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
52
+ ./cc-test-reporter before-build
53
+ bundle exec rspec --profile 10 \
54
+ --format RspecJunitFormatter \
55
+ --out /tmp/test-results/rspec.xml \
56
+ --format progress \
57
+ $TEST_FILES
58
+ ./cc-test-reporter format-coverage -t simplecov $CIRCLE_ARTIFACTS/coverage/.resultset.json
59
+ ./cc-test-reporter upload-coverage
60
+
61
+ # collect reports
62
+ - store_test_results:
63
+ path: /tmp/test-results
64
+ - store_artifacts:
65
+ path: /tmp/test-results
66
+ destination: test-results
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ InstalledFiles
7
+ _yardoc
8
+ coverage
9
+ doc/
10
+ lib/bundler/man
11
+ pkg
12
+ rdoc
13
+ spec/reports
14
+ test/tmp
15
+ test/version_tmp
16
+ tmp
17
+ build_and_publish
18
+ .rubocop*
19
+ .DS_Store
20
+ .ruby-version
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ zoom_rb (0.10.0)
5
+ httparty (~> 0.13)
6
+ json (>= 1.8)
7
+ jwt
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
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)
25
+ mime-types (~> 3.0)
26
+ 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)
32
+ mime-types-data (~> 3.2015)
33
+ mime-types-data (3.2019.1009)
34
+ 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)
43
+ 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)
51
+ diff-lcs (>= 1.2.0, < 2.0)
52
+ rspec-support (~> 3.8.0)
53
+ rspec-mocks (3.8.0)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.8.0)
56
+ rspec-support (3.8.0)
57
+ rspec_junit_formatter (0.4.1)
58
+ rspec-core (>= 2, < 4, != 2.12.0)
59
+ rubocop (0.60.0)
60
+ jaro_winkler (~> 1.5.1)
61
+ parallel (~> 1.10)
62
+ parser (>= 2.5, != 2.5.1.1)
63
+ powerpack (~> 0.1)
64
+ rainbow (>= 2.2.2, < 4.0)
65
+ 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)
71
+ simplecov (0.16.1)
72
+ docile (~> 1.1)
73
+ json (>= 1.8, < 3)
74
+ simplecov-html (~> 0.10.0)
75
+ simplecov-html (0.10.2)
76
+ unicode-display_width (1.4.0)
77
+ webmock (3.4.2)
78
+ addressable (>= 2.3.6)
79
+ crack (>= 0.3.2)
80
+ hashdiff
81
+
82
+ PLATFORMS
83
+ ruby
84
+
85
+ DEPENDENCIES
86
+ hint-rubocop_style (~> 0)
87
+ pry (~> 0)
88
+ rspec (~> 3.8)
89
+ rspec_junit_formatter (~> 0.4.1)
90
+ simplecov (~> 0.16.1)
91
+ webmock (~> 3.4)
92
+ zoom_rb!
93
+
94
+ BUNDLED WITH
95
+ 1.17.2
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2018 Hint Media
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Makefile ADDED
@@ -0,0 +1,5 @@
1
+ help:
2
+ @echo "make console"
3
+
4
+ console:
5
+ irb -rubygems -I lib -r zoom.rb
data/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # zoom_rb [![CircleCI](https://circleci.com/gh/hintmedia/zoom_rb.svg?style=svg)](https://circleci.com/gh/hintmedia/zoom_rb) [![Maintainability](https://api.codeclimate.com/v1/badges/f41fdd0c73fd39c6732a/maintainability)](https://codeclimate.com/github/hintmedia/zoom_rb/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/f41fdd0c73fd39c6732a/test_coverage)](https://codeclimate.com/github/hintmedia/zoom_rb/test_coverage)
2
+
3
+ Ruby wrapper gem for zoom.us API (currently `v2`)
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'zoom_rb'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install zoom_rb
18
+
19
+ ## Usage
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.
22
+
23
+ ```ruby
24
+ require 'zoom'
25
+
26
+ Zoom.configure do |c|
27
+ c.api_key = 'xxx'
28
+ c.api_secret = 'xxx'
29
+ end
30
+
31
+ zoom_client = Zoom.new
32
+ ```
33
+
34
+ To create an OAuth client, create the client directly
35
+
36
+ ```ruby
37
+ require 'zoom'
38
+
39
+ zoom_client = Zoom::Client::OAuth.new(access_token: 'xxx', timeout: 15)
40
+ ```
41
+
42
+ With the client, access the API
43
+
44
+ ```ruby
45
+ user_list = zoom_client.user_list
46
+ user_list['users'].each do |user|
47
+ user_id = user['id']
48
+ puts zoom_client.meeting_list(host_id: user_id)
49
+ end
50
+
51
+ begin
52
+ user_list = zoom_client.user_list!
53
+ rescue Zoom::Error => exception
54
+ puts 'Something went wrong'
55
+ end
56
+ ```
57
+
58
+
59
+ ## Contributing
60
+
61
+ 1. Fork it
62
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
63
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
64
+ 4. Push to the branch (`git push origin my-new-feature`)
65
+ 5. Create new Pull Request
data/lib/zoom.rb ADDED
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ $:.unshift File.dirname(__FILE__)
4
+
5
+ require 'zoom/version'
6
+ require 'zoom/constants'
7
+ require 'zoom/params'
8
+ require 'zoom/utils'
9
+ require 'zoom/actions/account'
10
+ require 'zoom/actions/group'
11
+ require 'zoom/actions/m323_device'
12
+ require 'zoom/actions/meeting'
13
+ require 'zoom/actions/metrics'
14
+ require 'zoom/actions/recording'
15
+ require 'zoom/actions/report'
16
+ require 'zoom/actions/user'
17
+ require 'zoom/actions/webinar'
18
+ require 'zoom/actions/im/chat'
19
+ require 'zoom/actions/im/group'
20
+ require 'zoom/client'
21
+ require 'zoom/error'
22
+
23
+ module Zoom
24
+ class << self
25
+ attr_accessor :configuration
26
+
27
+ def new
28
+ @configuration ||= Configuration.new
29
+ Zoom::Client::JWT.new(
30
+ api_key: @configuration.api_key,
31
+ api_secret: @configuration.api_secret,
32
+ timeout: @configuration.timeout
33
+ )
34
+ end
35
+
36
+ def configure
37
+ @configuration ||= Configuration.new
38
+ yield(@configuration)
39
+ end
40
+ end
41
+
42
+ class Configuration
43
+ attr_accessor :api_key, :api_secret, :timeout, :access_token
44
+
45
+ def initialize
46
+ @api_key = @api_secret = 'xxx'
47
+ @access_token = nil
48
+ @timeout = 15
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,93 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
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
11
+
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
17
+
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
23
+
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
29
+
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
35
+
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
41
+
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'
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
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Zoom
4
+ module Actions
5
+ module Group
6
+ end
7
+ end
8
+ end