zoom_rb 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +64 -0
- data/.gitignore +19 -0
- data/.ruby-version +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +91 -0
- data/LICENSE +22 -0
- data/Makefile +5 -0
- data/README.md +51 -0
- data/lib/zoom.rb +49 -0
- data/lib/zoom/actions/account.rb +93 -0
- data/lib/zoom/actions/group.rb +8 -0
- data/lib/zoom/actions/im/chat.rb +29 -0
- data/lib/zoom/actions/im/group.rb +10 -0
- data/lib/zoom/actions/m323_device.rb +8 -0
- data/lib/zoom/actions/meeting.rb +80 -0
- data/lib/zoom/actions/metrics.rb +29 -0
- data/lib/zoom/actions/recording.rb +35 -0
- data/lib/zoom/actions/report.rb +29 -0
- data/lib/zoom/actions/user.rb +146 -0
- data/lib/zoom/actions/webinar.rb +110 -0
- data/lib/zoom/client.rb +36 -0
- data/lib/zoom/defaults.rb +96 -0
- data/lib/zoom/error.rb +9 -0
- data/lib/zoom/interface.rb +6 -0
- data/lib/zoom/params.rb +64 -0
- data/lib/zoom/utils.rb +74 -0
- data/spec/fixtures/chat/get.json +16 -0
- data/spec/fixtures/chat/list.json +16 -0
- data/spec/fixtures/error/validation.json +10 -0
- data/spec/fixtures/mc_recording_list.json +51 -0
- data/spec/fixtures/meeting/create.json +24 -0
- data/spec/fixtures/meeting/delete.json +4 -0
- data/spec/fixtures/meeting/end.json +4 -0
- data/spec/fixtures/meeting/get.json +34 -0
- data/spec/fixtures/meeting/list.json +32 -0
- data/spec/fixtures/meeting/live.json +32 -0
- data/spec/fixtures/meeting/register.json +7 -0
- data/spec/fixtures/meeting/update.json +4 -0
- data/spec/fixtures/metrics_crc.json +105 -0
- data/spec/fixtures/metrics_meetingdetail.json +32 -0
- data/spec/fixtures/metrics_meetings.json +26 -0
- data/spec/fixtures/recording_delete.json +4 -0
- data/spec/fixtures/recording_get.json +37 -0
- data/spec/fixtures/recording_list.json +51 -0
- data/spec/fixtures/report/getaccountreport.json +23 -0
- data/spec/fixtures/report/getaudioreport.json +22 -0
- data/spec/fixtures/report/getdailyreport.json +13 -0
- data/spec/fixtures/report/getuserreport.json +24 -0
- data/spec/fixtures/report_getaccountreport.json +23 -0
- data/spec/fixtures/report_getdailyreport.json +83 -0
- data/spec/fixtures/report_getuserreport.json +24 -0
- data/spec/fixtures/user/assistant/delete.json +5 -0
- data/spec/fixtures/user/assistant/set.json +5 -0
- data/spec/fixtures/user/autocreate.json +51 -0
- data/spec/fixtures/user/autocreate2.json +51 -0
- data/spec/fixtures/user/create.json +7 -0
- data/spec/fixtures/user/custcreate.json +10 -0
- data/spec/fixtures/user/delete.json +0 -0
- data/spec/fixtures/user/get.json +23 -0
- data/spec/fixtures/user/getbyemail.json +8 -0
- data/spec/fixtures/user/list.json +23 -0
- data/spec/fixtures/user/pending.json +56 -0
- data/spec/fixtures/user/permanent_delete.json +4 -0
- data/spec/fixtures/user/update.json +0 -0
- data/spec/fixtures/webinar/create.json +29 -0
- data/spec/fixtures/webinar/delete.json +0 -0
- data/spec/fixtures/webinar/list.json +20 -0
- data/spec/fixtures/webinar/registrant/add.json +7 -0
- data/spec/fixtures/webinar/registrant/list.json +36 -0
- data/spec/fixtures/webinar/update.json +0 -0
- data/spec/fixtures/webinar_delete.json +4 -0
- data/spec/fixtures/webinar_end.json +4 -0
- data/spec/fixtures/webinar_get.json +17 -0
- data/spec/fixtures/webinar_update.json +4 -0
- data/spec/lib/zoom/actions/group/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/edit_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/get_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/member/add_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/member/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/member/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/chat/get_spec.rb +64 -0
- data/spec/lib/zoom/actions/im/chat/list_spec.rb +58 -0
- data/spec/lib/zoom/actions/im/group/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/edit_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/get_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/member/add_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/member/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/member/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/update_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/billing_update_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/get_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/plan/add_spec.rb +0 -0
- data/spec/lib/zoom/actions/ma/account/plan/get_spec.rb +0 -0
- data/spec/lib/zoom/actions/ma/account/plan/subscribe_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/plan/update_spec.rb +3 -0
- data/spec/lib/zoom/actions/meeting/create_spec.rb +66 -0
- data/spec/lib/zoom/actions/meeting/delete_spec.rb +55 -0
- data/spec/lib/zoom/actions/meeting/end_spec.rb +55 -0
- data/spec/lib/zoom/actions/meeting/get_spec.rb +59 -0
- data/spec/lib/zoom/actions/meeting/list_spec.rb +48 -0
- data/spec/lib/zoom/actions/meeting/live_spec.rb +43 -0
- data/spec/lib/zoom/actions/meeting/register_spec.rb +45 -0
- data/spec/lib/zoom/actions/meeting/update_spec.rb +53 -0
- data/spec/lib/zoom/actions/metrics/crc_spec.rb +48 -0
- data/spec/lib/zoom/actions/metrics/im_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/meetingdetail_spec.rb +51 -0
- data/spec/lib/zoom/actions/metrics/meetings_spec.rb +61 -0
- data/spec/lib/zoom/actions/metrics/qos_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/webinardetail_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/webinars_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/zoomroomdetail_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/zoomrooms_spec.rb +3 -0
- data/spec/lib/zoom/actions/recording/delete_spec.rb +52 -0
- data/spec/lib/zoom/actions/recording/get_spec.rb +66 -0
- data/spec/lib/zoom/actions/recording/list_spec.rb +51 -0
- data/spec/lib/zoom/actions/recording/mc_list_spec.rb +51 -0
- data/spec/lib/zoom/actions/report/getaccountreport_spec.rb +57 -0
- data/spec/lib/zoom/actions/report/getaudioreport_spec.rb +3 -0
- data/spec/lib/zoom/actions/report/getdailyreport_spec.rb +62 -0
- data/spec/lib/zoom/actions/report/getuserreport_spec.rb +67 -0
- data/spec/lib/zoom/actions/user/activate_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/assistant/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/assistant/set_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/autocreate2_spec.rb +59 -0
- data/spec/lib/zoom/actions/user/autocreate_spec.rb +58 -0
- data/spec/lib/zoom/actions/user/checkemail_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/checkzpk_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/create_spec.rb +69 -0
- data/spec/lib/zoom/actions/user/custcreate_spec.rb +59 -0
- data/spec/lib/zoom/actions/user/deactivate_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/delete_spec.rb +40 -0
- data/spec/lib/zoom/actions/user/get_spec.rb +50 -0
- data/spec/lib/zoom/actions/user/getbyemail_spec.rb +54 -0
- data/spec/lib/zoom/actions/user/list_spec.rb +47 -0
- data/spec/lib/zoom/actions/user/revoketoken_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/update_spec.rb +40 -0
- data/spec/lib/zoom/actions/user/updatepassword_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/attendees_list_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/create_spec.rb +52 -0
- data/spec/lib/zoom/actions/webinar/delete_spec.rb +40 -0
- data/spec/lib/zoom/actions/webinar/end_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/get_spec.rb +65 -0
- data/spec/lib/zoom/actions/webinar/list_registration_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/list_spec.rb +48 -0
- data/spec/lib/zoom/actions/webinar/panelists_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/polls_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/questions_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/register_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/registrants/add_spec.rb +60 -0
- data/spec/lib/zoom/actions/webinar/registrants/approve_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/registrants/list_spec.rb +40 -0
- data/spec/lib/zoom/actions/webinar/registration_cancel_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/registration_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/update_spec.rb +40 -0
- data/spec/lib/zoom/actions/webinar/uuid_list_spec.rb +3 -0
- data/spec/lib/zoom/client_spec.rb +45 -0
- data/spec/lib/zoom/params_spec.rb +68 -0
- data/spec/lib/zoom/utils_spec.rb +73 -0
- data/spec/spec_helper.rb +35 -0
- data/zoom_rb.gemspec +29 -0
- metadata +483 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 771899544953b6b67911aad77c629938839f2942637fa1bbe0a633a2dab50a16
|
4
|
+
data.tar.gz: a25c504655e94701ea41d60912af9e505f33afdae244def78504ab06ab06ab54
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 34e6fae6ea6e5e7c17e0ed82eadbce2139eae11aea858320459c51cf2aa43e14dd5660fa194bcbf6322d38e9fbe3a3de47f3852946c08c0ea7e10e710bc762a7
|
7
|
+
data.tar.gz: 17926672d35bb693e3d73f839f007695ec9f1034c2dde19233d4642778eade7a3bf484d5b9ea2d1885874dd89b32374e6a1ed13ff3966efd8d32f344477e3b2b
|
@@ -0,0 +1,64 @@
|
|
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
|
+
docker:
|
9
|
+
# specify the version you desire here
|
10
|
+
- image: circleci/ruby:2.5.1-node-browsers
|
11
|
+
|
12
|
+
# Specify service dependencies here if necessary
|
13
|
+
# CircleCI maintains a library of pre-built images
|
14
|
+
# documented at https://circleci.com/docs/2.0/circleci-images/
|
15
|
+
# - image: circleci/postgres:9.4
|
16
|
+
|
17
|
+
working_directory: ~/repo
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- checkout
|
21
|
+
|
22
|
+
# Download and cache dependencies
|
23
|
+
- restore_cache:
|
24
|
+
keys:
|
25
|
+
- zoom-bundle-{{ checksum "Gemfile.lock" }}
|
26
|
+
# fallback to using the latest cache if no exact match is found
|
27
|
+
- zoom-bundle-
|
28
|
+
|
29
|
+
- run:
|
30
|
+
name: install dependencies
|
31
|
+
command: |
|
32
|
+
bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle
|
33
|
+
|
34
|
+
- save_cache:
|
35
|
+
paths:
|
36
|
+
- ./vendor/bundle
|
37
|
+
key: zoom-bundle-{{ checksum "Gemfile.lock" }}
|
38
|
+
|
39
|
+
- run:
|
40
|
+
name: Setup Code Climate test-reporter
|
41
|
+
command: |
|
42
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
43
|
+
chmod +x ./cc-test-reporter
|
44
|
+
|
45
|
+
- run:
|
46
|
+
name: run tests
|
47
|
+
command: |
|
48
|
+
mkdir /tmp/test-results
|
49
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
50
|
+
./cc-test-reporter before-build
|
51
|
+
bundle exec rspec --profile 10 \
|
52
|
+
--format RspecJunitFormatter \
|
53
|
+
--out /tmp/test-results/rspec.xml \
|
54
|
+
--format progress \
|
55
|
+
$TEST_FILES
|
56
|
+
./cc-test-reporter format-coverage -t simplecov $CIRCLE_ARTIFACTS/coverage/.resultset.json
|
57
|
+
./cc-test-reporter upload-coverage
|
58
|
+
|
59
|
+
# collect reports
|
60
|
+
- store_test_results:
|
61
|
+
path: /tmp/test-results
|
62
|
+
- store_artifacts:
|
63
|
+
path: /tmp/test-results
|
64
|
+
destination: test-results
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.1
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
zoom_rb (0.8.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.16.2)
|
25
|
+
multi_xml (>= 0.5.2)
|
26
|
+
jaro_winkler (1.5.1)
|
27
|
+
json (2.1.0)
|
28
|
+
jwt (2.1.0)
|
29
|
+
method_source (0.9.0)
|
30
|
+
multi_xml (0.6.0)
|
31
|
+
parallel (1.12.1)
|
32
|
+
parser (2.5.1.2)
|
33
|
+
ast (~> 2.4.0)
|
34
|
+
powerpack (0.1.2)
|
35
|
+
pry (0.11.3)
|
36
|
+
coderay (~> 1.1.0)
|
37
|
+
method_source (~> 0.9.0)
|
38
|
+
public_suffix (3.0.3)
|
39
|
+
rainbow (3.0.0)
|
40
|
+
rspec (3.8.0)
|
41
|
+
rspec-core (~> 3.8.0)
|
42
|
+
rspec-expectations (~> 3.8.0)
|
43
|
+
rspec-mocks (~> 3.8.0)
|
44
|
+
rspec-core (3.8.0)
|
45
|
+
rspec-support (~> 3.8.0)
|
46
|
+
rspec-expectations (3.8.1)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.8.0)
|
49
|
+
rspec-mocks (3.8.0)
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
+
rspec-support (~> 3.8.0)
|
52
|
+
rspec-support (3.8.0)
|
53
|
+
rspec_junit_formatter (0.4.1)
|
54
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
55
|
+
rubocop (0.58.2)
|
56
|
+
jaro_winkler (~> 1.5.1)
|
57
|
+
parallel (~> 1.10)
|
58
|
+
parser (>= 2.5, != 2.5.1.1)
|
59
|
+
powerpack (~> 0.1)
|
60
|
+
rainbow (>= 2.2.2, < 4.0)
|
61
|
+
ruby-progressbar (~> 1.7)
|
62
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
63
|
+
rubocop-rspec (1.29.0)
|
64
|
+
rubocop (>= 0.58.0)
|
65
|
+
ruby-progressbar (1.10.0)
|
66
|
+
safe_yaml (1.0.4)
|
67
|
+
simplecov (0.16.1)
|
68
|
+
docile (~> 1.1)
|
69
|
+
json (>= 1.8, < 3)
|
70
|
+
simplecov-html (~> 0.10.0)
|
71
|
+
simplecov-html (0.10.2)
|
72
|
+
unicode-display_width (1.4.0)
|
73
|
+
webmock (3.4.2)
|
74
|
+
addressable (>= 2.3.6)
|
75
|
+
crack (>= 0.3.2)
|
76
|
+
hashdiff
|
77
|
+
|
78
|
+
PLATFORMS
|
79
|
+
ruby
|
80
|
+
|
81
|
+
DEPENDENCIES
|
82
|
+
hint-rubocop_style
|
83
|
+
pry
|
84
|
+
rspec
|
85
|
+
rspec_junit_formatter
|
86
|
+
simplecov
|
87
|
+
webmock
|
88
|
+
zoom_rb!
|
89
|
+
|
90
|
+
BUNDLED WITH
|
91
|
+
1.16.1
|
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
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
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
|
+
```ruby
|
22
|
+
require 'zoom_rb'
|
23
|
+
|
24
|
+
Zoom.configure do |c|
|
25
|
+
c.api_key = 'xxx'
|
26
|
+
c.api_secret = 'xxx'
|
27
|
+
end
|
28
|
+
|
29
|
+
zoom_client = Zoom.new
|
30
|
+
|
31
|
+
user_list = zoom_client.user_list
|
32
|
+
user_list['users'].each do |user|
|
33
|
+
user_id = user['id']
|
34
|
+
puts zoom_client.meeting_list(host_id: user_id)
|
35
|
+
end
|
36
|
+
|
37
|
+
begin
|
38
|
+
user_list = zoom_client.user_list!
|
39
|
+
rescue Zoom::Error => exception
|
40
|
+
puts 'Something went wrong'
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
1. Fork it
|
48
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
49
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
50
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
51
|
+
5. Create new Pull Request
|
data/lib/zoom.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$:.unshift File.dirname(__FILE__)
|
4
|
+
|
5
|
+
require 'zoom/defaults'
|
6
|
+
require 'zoom/params'
|
7
|
+
require 'zoom/utils'
|
8
|
+
require 'zoom/actions/account'
|
9
|
+
require 'zoom/actions/group'
|
10
|
+
require 'zoom/actions/m323_device'
|
11
|
+
require 'zoom/actions/meeting'
|
12
|
+
require 'zoom/actions/metrics'
|
13
|
+
require 'zoom/actions/recording'
|
14
|
+
require 'zoom/actions/report'
|
15
|
+
require 'zoom/actions/user'
|
16
|
+
require 'zoom/actions/webinar'
|
17
|
+
require 'zoom/actions/im/chat'
|
18
|
+
require 'zoom/actions/im/group'
|
19
|
+
require 'zoom/client'
|
20
|
+
require 'zoom/error'
|
21
|
+
|
22
|
+
module Zoom
|
23
|
+
class << self
|
24
|
+
attr_accessor :configuration
|
25
|
+
|
26
|
+
def new
|
27
|
+
@configuration ||= Configuration.new
|
28
|
+
Zoom::Client.new(
|
29
|
+
api_key: @configuration.api_key,
|
30
|
+
api_secret: @configuration.api_secret,
|
31
|
+
timeout: @configuration.timeout
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def configure
|
36
|
+
@configuration ||= Configuration.new
|
37
|
+
yield(@configuration)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
class Configuration
|
42
|
+
attr_accessor :api_key, :api_secret, :timeout
|
43
|
+
|
44
|
+
def initialize
|
45
|
+
@api_key = @api_secret = 'xxx'
|
46
|
+
@timeout = 15
|
47
|
+
end
|
48
|
+
end
|
49
|
+
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
|
+
# TODO: implement accounts_list
|
8
|
+
# options = Utils.extract_options!(args)
|
9
|
+
raise Zoom::NotImplemented, 'accounts_list is not yet implemented'
|
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
|
+
# TODO: implement account_settings_get
|
38
|
+
# options = Utils.extract_options!(args)
|
39
|
+
raise Zoom::NotImplemented, 'account_settings_get is not yet implemented'
|
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,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Zoom
|
4
|
+
module Actions
|
5
|
+
module IM
|
6
|
+
module Chat
|
7
|
+
# Get chat messages for a specified period.
|
8
|
+
def chat_get(*args)
|
9
|
+
options = Utils.extract_options!(args)
|
10
|
+
Utils.require_params(%i[access_token session_id from to], options)
|
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
|
+
|
16
|
+
# Get chat history list for a specified time period.
|
17
|
+
def chat_list(*args)
|
18
|
+
options = Utils.extract_options!(args)
|
19
|
+
Utils.require_params(%i[access_token from to], options)
|
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
|
24
|
+
|
25
|
+
Utils.define_bang_methods(self)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|