zoomus 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/zoomus.rb +1 -0
- data/lib/zoomus/actions/recording.rb +35 -0
- data/lib/zoomus/actions/user.rb +15 -1
- data/lib/zoomus/client.rb +1 -0
- data/spec/fixtures/mc_recording_list.json +51 -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/user_autocreate.json +10 -0
- data/spec/lib/zoomus/actions/recording/delete_spec.rb +50 -0
- data/spec/lib/zoomus/actions/recording/get_spec.rb +64 -0
- data/spec/lib/zoomus/actions/recording/list_spec.rb +49 -0
- data/spec/lib/zoomus/actions/recording/mc_list_spec.rb +49 -0
- data/spec/lib/zoomus/actions/user/autocreate2_spec.rb +62 -0
- data/spec/lib/zoomus/actions/user/autocreate_spec.rb +62 -0
- data/zoomus.gemspec +1 -1
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7184ee88ee9806509a15fcee248f1f541244e168
|
4
|
+
data.tar.gz: 2b1f82f54fce4e6b6bac3e21e09af2f62d62f787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36b38783b3c878195185c19dedde8c92f7e5909f3eaa872e3ddc9964cddc7e5103cd18f0136e5c1d7aae69646d5aaa191d62855641ec7d993474def6d0bfd95f
|
7
|
+
data.tar.gz: c4413ca025a48075148a89a31636fd42e5f59fadc5e09104a78eb86fbc7c7d6e72915451678f5c8e77824c6b8d4d070437440205c75dab72ae3f0075b48ce6d4
|
data/README.md
CHANGED
@@ -19,12 +19,15 @@ Or install it yourself as:
|
|
19
19
|
## Available actions
|
20
20
|
|
21
21
|
- user/create
|
22
|
+
- user/autocreate
|
23
|
+
- user/autocreate2
|
22
24
|
- user/custcreate
|
23
25
|
- user/update
|
24
26
|
- user/list
|
25
27
|
- user/pending
|
26
28
|
- user/get
|
27
29
|
- user/getbyemail
|
30
|
+
- user/delete
|
28
31
|
- meeting/get
|
29
32
|
- meeting/end
|
30
33
|
- meeting/create
|
@@ -39,6 +42,10 @@ Or install it yourself as:
|
|
39
42
|
- webinar/list
|
40
43
|
- webinar/get
|
41
44
|
- webinar/end
|
45
|
+
- recording/list
|
46
|
+
- mc/recording/list
|
47
|
+
- recording/get
|
48
|
+
- recording/delete
|
42
49
|
|
43
50
|
## Example
|
44
51
|
```ruby
|
@@ -53,7 +60,7 @@ zoomus_client = Zoomus.new
|
|
53
60
|
|
54
61
|
user_list = zoomus_client.user_list
|
55
62
|
user_list['users'].each do |user|
|
56
|
-
user_id =
|
63
|
+
user_id = user['id']
|
57
64
|
puts zoomus_client.meeting_list(:host_id => user_id)
|
58
65
|
end
|
59
66
|
|
data/lib/zoomus.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
module Zoomus
|
2
|
+
module Actions
|
3
|
+
module Recording
|
4
|
+
|
5
|
+
def recording_list(*args)
|
6
|
+
options = Utils.extract_options!(args)
|
7
|
+
Utils.require_params([:host_id], options)
|
8
|
+
Utils.process_datetime_params!([:from, :to], options)
|
9
|
+
Utils.parse_response self.class.post('/recording/list', :query => options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def mc_recording_list(*args)
|
13
|
+
options = Utils.extract_options!(args)
|
14
|
+
Utils.require_params([:host_id], options)
|
15
|
+
Utils.process_datetime_params!([:from, :to], options)
|
16
|
+
Utils.parse_response self.class.post('/mc/recording/list', :query => options)
|
17
|
+
end
|
18
|
+
|
19
|
+
def recording_get(*args)
|
20
|
+
options = Utils.extract_options!(args)
|
21
|
+
Utils.require_params([:meeting_id], options)
|
22
|
+
Utils.parse_response self.class.post('/recording/get', :query => options)
|
23
|
+
end
|
24
|
+
|
25
|
+
def recording_delete(*args)
|
26
|
+
options = Utils.extract_options!(args)
|
27
|
+
Utils.require_params([:meeting_id], options)
|
28
|
+
Utils.parse_response self.class.post('/recording/delete', :query => options)
|
29
|
+
end
|
30
|
+
|
31
|
+
Utils.define_bang_methods(self)
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/zoomus/actions/user.rb
CHANGED
@@ -48,8 +48,22 @@ module Zoomus
|
|
48
48
|
Utils.parse_response self.class.post('/user/getbyemail', :query => options)
|
49
49
|
end
|
50
50
|
|
51
|
+
def user_autocreate(*args)
|
52
|
+
options = Utils.extract_options!(args)
|
53
|
+
Utils.require_params([:type, :email, :password], options)
|
54
|
+
Utils.parse_response self.class.post('/user/autocreate', :query => options)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Need to contact zoom support to enable autocreate2 on your account
|
58
|
+
# Behaves like autocreate, but users email address does not have to match managed domain
|
59
|
+
def user_autocreate2(*args)
|
60
|
+
options = Utils.extract_options!(args)
|
61
|
+
Utils.require_params([:type, :email, :password], options)
|
62
|
+
Utils.parse_response self.class.post('/user/autocreate2', :query => options)
|
63
|
+
end
|
64
|
+
|
51
65
|
Utils.define_bang_methods(self)
|
52
|
-
|
66
|
+
|
53
67
|
end
|
54
68
|
end
|
55
69
|
end
|
data/lib/zoomus/client.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"page_count": 1,
|
3
|
+
"page_number": 1,
|
4
|
+
"page_size": 15,
|
5
|
+
"total_records": 1,
|
6
|
+
"meetings": [{
|
7
|
+
"uuid": "j0N0YDBYSQGB4fRv444444==",
|
8
|
+
"meeting_number": 7565121024,
|
9
|
+
"host_id": "kEFomHcIRgqxZT8D086O6A",
|
10
|
+
"account_id": "NyEqCEoYSNOr4jLMHoO2tA",
|
11
|
+
"topic": "Rcoky test recording delete",
|
12
|
+
"start_time": "2014-11-06T04:10:10Z",
|
13
|
+
"timezone": "America/Los_Angeles",
|
14
|
+
"duration": 999,
|
15
|
+
"total_size": 4324324324,
|
16
|
+
"recording_count": 4,
|
17
|
+
"recording_files": [{
|
18
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3041",
|
19
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
20
|
+
"recording_start": "2014-11-06T04:14:10Z",
|
21
|
+
"recording_end": "2014-11-06T04:24:10Z",
|
22
|
+
"file_type": "M4A",
|
23
|
+
"file_size": 432432,
|
24
|
+
"play_url": "https://brand.zoom.us/recording/play/00401415-6783-0B14-608A-34C1DD9E3041"
|
25
|
+
}, {
|
26
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3042",
|
27
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
28
|
+
"recording_start": "2014-11-06T04:25:10Z",
|
29
|
+
"recording_end": "2014-11-06T04:26:10Z",
|
30
|
+
"file_type": "MP4",
|
31
|
+
"file_size": 432532465,
|
32
|
+
"play_url": "https://brand.zoom.us/recording/play/00401415-6783-0B14-608A-34C1DD9E3042"
|
33
|
+
}, {
|
34
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3043",
|
35
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
36
|
+
"recording_start": "2014-11-06T04:36:10Z",
|
37
|
+
"recording_end": "2014-11-06T04:56:10Z",
|
38
|
+
"file_type": "M4A",
|
39
|
+
"file_size": 564,
|
40
|
+
"file_path": "/home/cmr-ssh/replay/2015/03/27/454289936/EDB9994C-8E0D-4688-B1CE-6460F2742A10/GMT20150327-083026_test-pmem-recording.mp4"
|
41
|
+
}, {
|
42
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3044",
|
43
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
44
|
+
"recording_start": "2014-11-06T04:56:10Z",
|
45
|
+
"recording_end": "2014-11-06T04:56:12Z",
|
46
|
+
"file_type": "MP4",
|
47
|
+
"file_size": 643534,
|
48
|
+
"file_path": "/home/cmr-ssh/replay/2015/03/27/454289936/EDB9994C-8E0D-4688-B1CE-6460F2742A10/GMT20150327-083026_test-pmem-recording.mp4"
|
49
|
+
}]
|
50
|
+
}]
|
51
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"uuid": "ucc69C82Q5mTNyCRWE29Aw==",
|
3
|
+
"meeting_number": 933560800,
|
4
|
+
"host_id": "kEFomHcIRgqxZT8D086O6A",
|
5
|
+
"account_id": "NyEqCEoYSNOr4jLMHoO2tA",
|
6
|
+
"topic": "vgfdsffdfdsf s3423432",
|
7
|
+
"start_time": "2015-04-13T01:06:04Z",
|
8
|
+
"timezone": "UTC",
|
9
|
+
"duration": 1,
|
10
|
+
"total_size": 686496,
|
11
|
+
"recording_count": 3,
|
12
|
+
"recording_files": [{
|
13
|
+
"id": "654234c0-ca6e-4dfd-a09d-54f85951658f",
|
14
|
+
"meeting_id": "ucc69C82Q5mTNyCRWE29Aw==",
|
15
|
+
"recording_start": "2015-04-13T01:06:36Z",
|
16
|
+
"recording_end": "2015-04-13T01:06:47Z",
|
17
|
+
"file_type": "MP4",
|
18
|
+
"file_size": 438482,
|
19
|
+
"play_url": "https://rocky.zoom.us/recording/play/654234c0-ca6e-4dfd-a09d-54f85951658f"
|
20
|
+
}, {
|
21
|
+
"id": "51ff09f7-e8d8-4b29-9e61-fb8e0cbc7246",
|
22
|
+
"meeting_id": "ucc69C82Q5mTNyCRWE29Aw==",
|
23
|
+
"recording_start": "2015-04-13T01:06:55Z",
|
24
|
+
"recording_end": "2015-04-13T01:07:02Z",
|
25
|
+
"file_type": "MP4",
|
26
|
+
"file_size": 244958,
|
27
|
+
"play_url": "https://rocky.zoom.us/recording/play/51ff09f7-e8d8-4b29-9e61-fb8e0cbc7246"
|
28
|
+
}, {
|
29
|
+
"id": "b601d00e-497a-450f-bb05-9896ce20c03e",
|
30
|
+
"meeting_id": "ucc69C82Q5mTNyCRWE29Aw==",
|
31
|
+
"recording_start": "2015-04-13T01:06:55Z",
|
32
|
+
"recording_end": "2015-04-13T01:07:02Z",
|
33
|
+
"file_type": "M4A",
|
34
|
+
"file_size": 3056,
|
35
|
+
"play_url": "https://rocky.zoom.us/recording/play/b601d00e-497a-450f-bb05-9896ce20c03e"
|
36
|
+
}]
|
37
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"page_count": 1,
|
3
|
+
"page_number": 1,
|
4
|
+
"page_size": 15,
|
5
|
+
"total_records": 1,
|
6
|
+
"meetings": [{
|
7
|
+
"uuid": "j0N0YDBYSQGB4fRv444444==",
|
8
|
+
"meeting_number": 7565121024,
|
9
|
+
"host_id": "kEFomHcIRgqxZT8D086O6A",
|
10
|
+
"account_id": "NyEqCEoYSNOr4jLMHoO2tA",
|
11
|
+
"topic": "Rocky test recording delete",
|
12
|
+
"start_time": "2014-11-06T04:10:10Z",
|
13
|
+
"timezone": "America/Los_Angeles",
|
14
|
+
"duration": 999,
|
15
|
+
"total_size": 4324324324,
|
16
|
+
"recording_count": 4,
|
17
|
+
"recording_files": [{
|
18
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3041",
|
19
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
20
|
+
"recording_start": "2014-11-06T04:14:10Z",
|
21
|
+
"recording_end": "2014-11-06T04:24:10Z",
|
22
|
+
"file_type": "M4A",
|
23
|
+
"file_size": 432432,
|
24
|
+
"play_url": "https://brand.zoom.us/recording/play/00401415-6783-0B14-608A-34C1DD9E3041"
|
25
|
+
}, {
|
26
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3042",
|
27
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
28
|
+
"recording_start": "2014-11-06T04:25:10Z",
|
29
|
+
"recording_end": "2014-11-06T04:26:10Z",
|
30
|
+
"file_type": "MP4",
|
31
|
+
"file_size": 432532465,
|
32
|
+
"play_url": "https://brand.zoom.us/recording/play/00401415-6783-0B14-608A-34C1DD9E3042"
|
33
|
+
}, {
|
34
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3043",
|
35
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
36
|
+
"recording_start": "2014-11-06T04:36:10Z",
|
37
|
+
"recording_end": "2014-11-06T04:56:10Z",
|
38
|
+
"file_type": "M4A",
|
39
|
+
"file_size": 564,
|
40
|
+
"play_url": "https://brand.zoom.us/recording/play/00401415-6783-0B14-608A-34C1DD9E3043"
|
41
|
+
}, {
|
42
|
+
"id": "00401415-6783-0B14-608A-34C1DD9E3044",
|
43
|
+
"meeting_id": "j0N0YDBYSQGB4fRv444444==",
|
44
|
+
"recording_start": "2014-11-06T04:56:10Z",
|
45
|
+
"recording_end": "2014-11-06T04:56:12Z",
|
46
|
+
"file_type": "MP4",
|
47
|
+
"file_size": 643534,
|
48
|
+
"play_url": "https://brand.zoom.us/recording/play/00401415-6783-0B14-608A-34C1DD9E3044"
|
49
|
+
}]
|
50
|
+
}]
|
51
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Recording do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:meeting_id => "ucc69C82Q5mTNyCRWE29Aw==" }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#recording_delete action" do
|
11
|
+
before :each do
|
12
|
+
stub_request(
|
13
|
+
:post,
|
14
|
+
zoomus_url("/recording/delete")
|
15
|
+
).to_return(:body => json_response("recording_delete"))
|
16
|
+
end
|
17
|
+
|
18
|
+
it "requires a 'meeting_id' argument" do
|
19
|
+
expect {
|
20
|
+
@zc.recording_delete(filter_key(@args, :meeting_id))
|
21
|
+
}.to raise_error(ArgumentError)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "returns a hash" do
|
25
|
+
expect(@zc.recording_delete(@args)).to be_kind_of(Hash)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "returns id and deleted at attributes" do
|
29
|
+
res = @zc.recording_delete(@args)
|
30
|
+
|
31
|
+
expect(res["id"]).to eq(@args[:meeting_id])
|
32
|
+
expect(res["deleted_at"]).to eq("2012-11-25T12:00:00Z")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "#recording_delete! action" do
|
37
|
+
before :each do
|
38
|
+
stub_request(
|
39
|
+
:post,
|
40
|
+
zoomus_url("/recording/delete")
|
41
|
+
).to_return(:body => json_response("error"))
|
42
|
+
end
|
43
|
+
|
44
|
+
it "raises Zoomus::Error exception" do
|
45
|
+
expect {
|
46
|
+
@zc.recording_delete!(@args)
|
47
|
+
}.to raise_error(Zoomus::Error)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Recording do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {
|
8
|
+
:meeting_id => "ucc69C82Q5mTNyCRWE29Aw=="
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#recording_get action" do
|
13
|
+
before :each do
|
14
|
+
stub_request(
|
15
|
+
:post,
|
16
|
+
zoomus_url("/recording/get")
|
17
|
+
).to_return(:body => json_response("recording_get"))
|
18
|
+
end
|
19
|
+
|
20
|
+
it "requires a 'meeting_id' argument" do
|
21
|
+
expect {
|
22
|
+
@zc.meeting_create(filter_key(@args, :meeting_id))
|
23
|
+
}.to raise_error(ArgumentError)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns a hash" do
|
27
|
+
expect(@zc.recording_get(@args)).to be_kind_of(Hash)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "returns id and attributes" do
|
31
|
+
res = @zc.recording_get(@args)
|
32
|
+
|
33
|
+
expect(res["uuid"]).to eq(@args[:meeting_id])
|
34
|
+
expect(res["meeting_number"]).to eq(933560800)
|
35
|
+
expect(res["host_id"]).to eq("kEFomHcIRgqxZT8D086O6A")
|
36
|
+
expect(res["account_id"]).to eq("NyEqCEoYSNOr4jLMHoO2tA")
|
37
|
+
expect(res["topic"]).to eq("vgfdsffdfdsf s3423432")
|
38
|
+
expect(res["start_time"]).to eq("2015-04-13T01:06:04Z")
|
39
|
+
expect(res["timezone"]).to eq("UTC")
|
40
|
+
expect(res["duration"]).to eq(1)
|
41
|
+
expect(res["total_size"]).to eq(686496)
|
42
|
+
expect(res["recording_count"]).to eq(3)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "returns 'recording_files' Array" do
|
46
|
+
expect(@zc.recording_get(@args)["recording_files"]).to be_kind_of(Array)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe "#recording_get! action" do
|
51
|
+
before :each do
|
52
|
+
stub_request(
|
53
|
+
:post,
|
54
|
+
zoomus_url("/recording/get")
|
55
|
+
).to_return(:body => json_response("error"))
|
56
|
+
end
|
57
|
+
|
58
|
+
it "raises Zoomus::Error exception" do
|
59
|
+
expect {
|
60
|
+
@zc.recording_get!(@args)
|
61
|
+
}.to raise_error(Zoomus::Error)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Recording do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:host_id => "kEFomHcIRgqxZT8D086O6A"}
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#recording_list action" do
|
11
|
+
before :each do
|
12
|
+
stub_request(
|
13
|
+
:post,
|
14
|
+
zoomus_url("/recording/list")
|
15
|
+
).to_return(:body => json_response("recording_list"))
|
16
|
+
end
|
17
|
+
|
18
|
+
it "requires a 'host_id' argument" do
|
19
|
+
expect{@zc.recording_list}.to raise_error(ArgumentError)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "returns a hash" do
|
23
|
+
expect(@zc.recording_list(@args)).to be_kind_of(Hash)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns 'total_records'" do
|
27
|
+
expect(@zc.recording_list(@args)["total_records"]).to eq(1)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "returns 'meetings' Array" do
|
31
|
+
expect(@zc.recording_list(@args)["meetings"]).to be_kind_of(Array)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "#recording_list! action" do
|
36
|
+
before :each do
|
37
|
+
stub_request(
|
38
|
+
:post,
|
39
|
+
zoomus_url("/recording/list")
|
40
|
+
).to_return(:body => json_response("error"))
|
41
|
+
end
|
42
|
+
|
43
|
+
it "raises Zoomus::Error exception" do
|
44
|
+
expect {
|
45
|
+
@zc.recording_list!(@args)
|
46
|
+
}.to raise_error(Zoomus::Error)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Recording do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:host_id => "kEFomHcIRgqxZT8D086O6A"}
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#mc_recording_list action" do
|
11
|
+
before :each do
|
12
|
+
stub_request(
|
13
|
+
:post,
|
14
|
+
zoomus_url("/mc/recording/list")
|
15
|
+
).to_return(:body => json_response("mc_recording_list"))
|
16
|
+
end
|
17
|
+
|
18
|
+
it "requires a 'host_id' argument" do
|
19
|
+
expect{@zc.mc_recording_list}.to raise_error(ArgumentError)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "returns a hash" do
|
23
|
+
expect(@zc.mc_recording_list(@args)).to be_kind_of(Hash)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns 'total_records'" do
|
27
|
+
expect(@zc.mc_recording_list(@args)["total_records"]).to eq(1)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "returns 'meetings' Array" do
|
31
|
+
expect(@zc.mc_recording_list(@args)["meetings"]).to be_kind_of(Array)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "#mc_recording_list! action" do
|
36
|
+
before :each do
|
37
|
+
stub_request(
|
38
|
+
:post,
|
39
|
+
zoomus_url("/mc/recording/list")
|
40
|
+
).to_return(:body => json_response("error"))
|
41
|
+
end
|
42
|
+
|
43
|
+
it "raises Zoomus::Error exception" do
|
44
|
+
expect {
|
45
|
+
@zc.mc_recording_list!(@args)
|
46
|
+
}.to raise_error(Zoomus::Error)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::User do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:email => "foo@bar.com",
|
8
|
+
:password => "somepassword123",
|
9
|
+
:first_name => "Foo",
|
10
|
+
:last_name => "Bar",
|
11
|
+
:type => 1}
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#user_autocreate2 action" do
|
15
|
+
before :each do
|
16
|
+
stub_request(
|
17
|
+
:post,
|
18
|
+
zoomus_url("/user/autocreate2")
|
19
|
+
).to_return(:body => json_response("user_autocreate")) # the api for autocreate2 is basically all the same
|
20
|
+
end
|
21
|
+
|
22
|
+
it "requires email param" do
|
23
|
+
expect{@zc.user_autocreate2(filter_key(@args, :email))}.to raise_error(ArgumentError)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "requires type param" do
|
27
|
+
expect{@zc.user_autocreate2(filter_key(@args, :type))}.to raise_error(ArgumentError)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "requires password param" do
|
31
|
+
expect{@zc.user_autocreate2(filter_key(@args, :password))}.to raise_error(ArgumentError)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a hash" do
|
35
|
+
expect(@zc.user_autocreate2(@args)).to be_kind_of(Hash)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "returns same params" do
|
39
|
+
res = @zc.user_autocreate2(@args)
|
40
|
+
|
41
|
+
expect(res["email"]).to eq(@args[:email])
|
42
|
+
expect(res["first_name"]).to eq(@args[:first_name])
|
43
|
+
expect(res["last_name"]).to eq(@args[:last_name])
|
44
|
+
expect(res["type"]).to eq(@args[:type])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "#user_autocreate2! action" do
|
49
|
+
before :each do
|
50
|
+
stub_request(
|
51
|
+
:post,
|
52
|
+
zoomus_url("/user/autocreate2")
|
53
|
+
).to_return(:body => json_response("error"))
|
54
|
+
end
|
55
|
+
|
56
|
+
it "raises Zoomus::Error exception" do
|
57
|
+
expect {
|
58
|
+
@zc.user_autocreate2!(@args)
|
59
|
+
}.to raise_error(Zoomus::Error)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::User do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:email => "foo@bar.com",
|
8
|
+
:password => "somepassword123",
|
9
|
+
:first_name => "Foo",
|
10
|
+
:last_name => "Bar",
|
11
|
+
:type => 1}
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "#user_autocreate action" do
|
15
|
+
before :each do
|
16
|
+
stub_request(
|
17
|
+
:post,
|
18
|
+
zoomus_url("/user/autocreate")
|
19
|
+
).to_return(:body => json_response("user_autocreate"))
|
20
|
+
end
|
21
|
+
|
22
|
+
it "requires email param" do
|
23
|
+
expect{@zc.user_autocreate(filter_key(@args, :email))}.to raise_error(ArgumentError)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "requires type param" do
|
27
|
+
expect{@zc.user_autocreate(filter_key(@args, :type))}.to raise_error(ArgumentError)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "requires password param" do
|
31
|
+
expect{@zc.user_autocreate(filter_key(@args, :password))}.to raise_error(ArgumentError)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns a hash" do
|
35
|
+
expect(@zc.user_autocreate(@args)).to be_kind_of(Hash)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "returns same params" do
|
39
|
+
res = @zc.user_autocreate(@args)
|
40
|
+
|
41
|
+
expect(res["email"]).to eq(@args[:email])
|
42
|
+
expect(res["first_name"]).to eq(@args[:first_name])
|
43
|
+
expect(res["last_name"]).to eq(@args[:last_name])
|
44
|
+
expect(res["type"]).to eq(@args[:type])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "#user_autocreate! action" do
|
49
|
+
before :each do
|
50
|
+
stub_request(
|
51
|
+
:post,
|
52
|
+
zoomus_url("/user/autocreate")
|
53
|
+
).to_return(:body => json_response("error"))
|
54
|
+
end
|
55
|
+
|
56
|
+
it "raises Zoomus::Error exception" do
|
57
|
+
expect {
|
58
|
+
@zc.user_autocreate!(@args)
|
59
|
+
}.to raise_error(Zoomus::Error)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/zoomus.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoomus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxim Colls
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- README.md
|
95
95
|
- lib/zoomus.rb
|
96
96
|
- lib/zoomus/actions/meeting.rb
|
97
|
+
- lib/zoomus/actions/recording.rb
|
97
98
|
- lib/zoomus/actions/report.rb
|
98
99
|
- lib/zoomus/actions/user.rb
|
99
100
|
- lib/zoomus/actions/webinar.rb
|
@@ -102,13 +103,18 @@ files:
|
|
102
103
|
- lib/zoomus/interface.rb
|
103
104
|
- lib/zoomus/utils.rb
|
104
105
|
- spec/fixtures/error.json
|
106
|
+
- spec/fixtures/mc_recording_list.json
|
105
107
|
- spec/fixtures/meeting_create.json
|
106
108
|
- spec/fixtures/meeting_delete.json
|
107
109
|
- spec/fixtures/meeting_get.json
|
108
110
|
- spec/fixtures/meeting_list.json
|
109
111
|
- spec/fixtures/meeting_update.json
|
112
|
+
- spec/fixtures/recording_delete.json
|
113
|
+
- spec/fixtures/recording_get.json
|
114
|
+
- spec/fixtures/recording_list.json
|
110
115
|
- spec/fixtures/report_getaccountreport.json
|
111
116
|
- spec/fixtures/report_getuserreport.json
|
117
|
+
- spec/fixtures/user_autocreate.json
|
112
118
|
- spec/fixtures/user_create.json
|
113
119
|
- spec/fixtures/user_custcreate.json
|
114
120
|
- spec/fixtures/user_delete.json
|
@@ -128,8 +134,14 @@ files:
|
|
128
134
|
- spec/lib/zoomus/actions/meeting/get_spec.rb
|
129
135
|
- spec/lib/zoomus/actions/meeting/list_spec.rb
|
130
136
|
- spec/lib/zoomus/actions/meeting/update_spec.rb
|
137
|
+
- spec/lib/zoomus/actions/recording/delete_spec.rb
|
138
|
+
- spec/lib/zoomus/actions/recording/get_spec.rb
|
139
|
+
- spec/lib/zoomus/actions/recording/list_spec.rb
|
140
|
+
- spec/lib/zoomus/actions/recording/mc_list_spec.rb
|
131
141
|
- spec/lib/zoomus/actions/report/getaccountreport_spec.rb
|
132
142
|
- spec/lib/zoomus/actions/report/getuserreport_spec.rb
|
143
|
+
- spec/lib/zoomus/actions/user/autocreate2_spec.rb
|
144
|
+
- spec/lib/zoomus/actions/user/autocreate_spec.rb
|
133
145
|
- spec/lib/zoomus/actions/user/create_spec.rb
|
134
146
|
- spec/lib/zoomus/actions/user/custcreate_spec.rb
|
135
147
|
- spec/lib/zoomus/actions/user/delete_spec.rb
|
@@ -173,13 +185,18 @@ specification_version: 4
|
|
173
185
|
summary: zoom.us API wrapper
|
174
186
|
test_files:
|
175
187
|
- spec/fixtures/error.json
|
188
|
+
- spec/fixtures/mc_recording_list.json
|
176
189
|
- spec/fixtures/meeting_create.json
|
177
190
|
- spec/fixtures/meeting_delete.json
|
178
191
|
- spec/fixtures/meeting_get.json
|
179
192
|
- spec/fixtures/meeting_list.json
|
180
193
|
- spec/fixtures/meeting_update.json
|
194
|
+
- spec/fixtures/recording_delete.json
|
195
|
+
- spec/fixtures/recording_get.json
|
196
|
+
- spec/fixtures/recording_list.json
|
181
197
|
- spec/fixtures/report_getaccountreport.json
|
182
198
|
- spec/fixtures/report_getuserreport.json
|
199
|
+
- spec/fixtures/user_autocreate.json
|
183
200
|
- spec/fixtures/user_create.json
|
184
201
|
- spec/fixtures/user_custcreate.json
|
185
202
|
- spec/fixtures/user_delete.json
|
@@ -199,8 +216,14 @@ test_files:
|
|
199
216
|
- spec/lib/zoomus/actions/meeting/get_spec.rb
|
200
217
|
- spec/lib/zoomus/actions/meeting/list_spec.rb
|
201
218
|
- spec/lib/zoomus/actions/meeting/update_spec.rb
|
219
|
+
- spec/lib/zoomus/actions/recording/delete_spec.rb
|
220
|
+
- spec/lib/zoomus/actions/recording/get_spec.rb
|
221
|
+
- spec/lib/zoomus/actions/recording/list_spec.rb
|
222
|
+
- spec/lib/zoomus/actions/recording/mc_list_spec.rb
|
202
223
|
- spec/lib/zoomus/actions/report/getaccountreport_spec.rb
|
203
224
|
- spec/lib/zoomus/actions/report/getuserreport_spec.rb
|
225
|
+
- spec/lib/zoomus/actions/user/autocreate2_spec.rb
|
226
|
+
- spec/lib/zoomus/actions/user/autocreate_spec.rb
|
204
227
|
- spec/lib/zoomus/actions/user/create_spec.rb
|
205
228
|
- spec/lib/zoomus/actions/user/custcreate_spec.rb
|
206
229
|
- spec/lib/zoomus/actions/user/delete_spec.rb
|