zoomus 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/README.md +6 -0
- data/lib/zoomus.rb +1 -0
- data/lib/zoomus/actions/metrics.rb +29 -0
- data/lib/zoomus/actions/report.rb +6 -0
- data/lib/zoomus/actions/user.rb +1 -1
- data/lib/zoomus/client.rb +1 -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/report_getdailyreport.json +83 -0
- data/spec/lib/zoomus/actions/metrics/crc_spec.rb +46 -0
- data/spec/lib/zoomus/actions/metrics/meetingdetail_spec.rb +49 -0
- data/spec/lib/zoomus/actions/metrics/meetings_spec.rb +59 -0
- data/spec/lib/zoomus/actions/report/getdailyreport_spec.rb +60 -0
- data/spec/lib/zoomus/actions/user/getbyemail_spec.rb +0 -4
- data/zoomus.gemspec +2 -2
- metadata +24 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7c3e8426c14cfa14d5ea3877d3aa844568406c8
|
4
|
+
data.tar.gz: 1786b484cb8b9b48228fec00a468654ade68573c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e56663987f1aa38a2644ad20e6476967133888d519415fa39ee6f9d2f87a9999b41e241fb651b329305b69378b49e8e617b678ada5fd7f0c0146bd95f6f365f2
|
7
|
+
data.tar.gz: e9d5df440b580943cd250d04527c91899c39f15603009d125350ec4c309c15907bb8e52dbd35e0fd86fa08fed42a44592661a90e828c6a0df48a5653eecf6094
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.4
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Zoomus Gem
|
2
2
|
|
3
|
+
![](https://travis-ci.org/mllocs/zoomus.svg?branch=master)
|
4
|
+
|
3
5
|
Ruby wrapper gem for zoom.us API v1.
|
4
6
|
|
5
7
|
## Installation
|
@@ -36,6 +38,7 @@ Or install it yourself as:
|
|
36
38
|
- meeting/update
|
37
39
|
- report/getaccountreport
|
38
40
|
- report/getuserreport
|
41
|
+
- report/getdailyreport
|
39
42
|
- webinar/create
|
40
43
|
- webinar/update
|
41
44
|
- webinar/delete
|
@@ -46,6 +49,9 @@ Or install it yourself as:
|
|
46
49
|
- mc/recording/list
|
47
50
|
- recording/get
|
48
51
|
- recording/delete
|
52
|
+
- metrics/crc
|
53
|
+
- metrics/meetings
|
54
|
+
- metrics/meetingdetail
|
49
55
|
|
50
56
|
## Example
|
51
57
|
```ruby
|
data/lib/zoomus.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
module Zoomus
|
2
|
+
module Actions
|
3
|
+
module Metrics
|
4
|
+
|
5
|
+
def metrics_crc(*args)
|
6
|
+
options = Utils.extract_options!(args)
|
7
|
+
Utils.require_params([:from, :to], options)
|
8
|
+
Utils.process_datetime_params!([:from, :to], options)
|
9
|
+
Utils.parse_response self.class.post("/metrics/crc", :query => options)
|
10
|
+
end
|
11
|
+
|
12
|
+
def metrics_meetings(*args)
|
13
|
+
options = Utils.extract_options!(args)
|
14
|
+
Utils.require_params([:from, :to, :type], options)
|
15
|
+
Utils.process_datetime_params!([:from, :to], options)
|
16
|
+
Utils.parse_response self.class.post("/metrics/meetings", :query => options)
|
17
|
+
end
|
18
|
+
|
19
|
+
def metrics_meetingdetail(*args)
|
20
|
+
options = Utils.extract_options!(args)
|
21
|
+
Utils.require_params([:meeting_id, :type], options)
|
22
|
+
Utils.parse_response self.class.post("/metrics/meetingdetail", :query => options)
|
23
|
+
end
|
24
|
+
|
25
|
+
Utils.define_bang_methods(self)
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -16,6 +16,12 @@ module Zoomus
|
|
16
16
|
Utils.parse_response self.class.post("/report/getuserreport", :query => options)
|
17
17
|
end
|
18
18
|
|
19
|
+
def report_getdailyreport(*args)
|
20
|
+
options = Utils.extract_options!(args)
|
21
|
+
Utils.require_params([:year, :month],options)
|
22
|
+
Utils.parse_response self.class.post("/report/getdailyreport", :query => options)
|
23
|
+
end
|
24
|
+
|
19
25
|
Utils.define_bang_methods(self)
|
20
26
|
|
21
27
|
end
|
data/lib/zoomus/actions/user.rb
CHANGED
@@ -44,7 +44,7 @@ module Zoomus
|
|
44
44
|
|
45
45
|
def user_getbyemail(*args)
|
46
46
|
options = Utils.extract_options!(args)
|
47
|
-
Utils.require_params([:email
|
47
|
+
Utils.require_params([:email], options)
|
48
48
|
Utils.parse_response self.class.post('/user/getbyemail', :query => options)
|
49
49
|
end
|
50
50
|
|
data/lib/zoomus/client.rb
CHANGED
@@ -0,0 +1,105 @@
|
|
1
|
+
|
2
|
+
{
|
3
|
+
"from": "2016-09-21",
|
4
|
+
"to": "2016-09-21",
|
5
|
+
"crc_ports_usage": [{
|
6
|
+
"date_time": "2016-09-21",
|
7
|
+
"crc_ports_hour_usage": [{
|
8
|
+
"hour": "00",
|
9
|
+
"max_usage": 0,
|
10
|
+
"total_usage": 0
|
11
|
+
}, {
|
12
|
+
"hour": "01",
|
13
|
+
"max_usage": 0,
|
14
|
+
"total_usage": 0
|
15
|
+
}, {
|
16
|
+
"hour": "02",
|
17
|
+
"max_usage": 0,
|
18
|
+
"total_usage": 0
|
19
|
+
}, {
|
20
|
+
"hour": "03",
|
21
|
+
"max_usage": 0,
|
22
|
+
"total_usage": 0
|
23
|
+
}, {
|
24
|
+
"hour": "04",
|
25
|
+
"max_usage": 0,
|
26
|
+
"total_usage": 0
|
27
|
+
}, {
|
28
|
+
"hour": "05",
|
29
|
+
"max_usage": 0,
|
30
|
+
"total_usage": 0
|
31
|
+
}, {
|
32
|
+
"hour": "06",
|
33
|
+
"max_usage": 0,
|
34
|
+
"total_usage": 0
|
35
|
+
}, {
|
36
|
+
"hour": "07",
|
37
|
+
"max_usage": 1,
|
38
|
+
"total_usage": 1
|
39
|
+
}, {
|
40
|
+
"hour": "08",
|
41
|
+
"max_usage": 1,
|
42
|
+
"total_usage": 1
|
43
|
+
}, {
|
44
|
+
"hour": "09",
|
45
|
+
"max_usage": 3,
|
46
|
+
"total_usage": 5
|
47
|
+
}, {
|
48
|
+
"hour": "10",
|
49
|
+
"max_usage": 8,
|
50
|
+
"total_usage": 11
|
51
|
+
}, {
|
52
|
+
"hour": "11",
|
53
|
+
"max_usage": 9,
|
54
|
+
"total_usage": 12
|
55
|
+
}, {
|
56
|
+
"hour": "12",
|
57
|
+
"max_usage": 8,
|
58
|
+
"total_usage": 15
|
59
|
+
}, {
|
60
|
+
"hour": "13",
|
61
|
+
"max_usage": 7,
|
62
|
+
"total_usage": 12
|
63
|
+
}, {
|
64
|
+
"hour": "14",
|
65
|
+
"max_usage": 10,
|
66
|
+
"total_usage": 16
|
67
|
+
}, {
|
68
|
+
"hour": "15",
|
69
|
+
"max_usage": 12,
|
70
|
+
"total_usage": 14
|
71
|
+
}, {
|
72
|
+
"hour": "16",
|
73
|
+
"max_usage": 11,
|
74
|
+
"total_usage": 16
|
75
|
+
}, {
|
76
|
+
"hour": "17",
|
77
|
+
"max_usage": 11,
|
78
|
+
"total_usage": 11
|
79
|
+
}, {
|
80
|
+
"hour": "18",
|
81
|
+
"max_usage": 10,
|
82
|
+
"total_usage": 11
|
83
|
+
}, {
|
84
|
+
"hour": "19",
|
85
|
+
"max_usage": 5,
|
86
|
+
"total_usage": 5
|
87
|
+
}, {
|
88
|
+
"hour": "20",
|
89
|
+
"max_usage": 3,
|
90
|
+
"total_usage": 3
|
91
|
+
}, {
|
92
|
+
"hour": "21",
|
93
|
+
"max_usage": 3,
|
94
|
+
"total_usage": 3
|
95
|
+
}, {
|
96
|
+
"hour": "22",
|
97
|
+
"max_usage": 3,
|
98
|
+
"total_usage": 3
|
99
|
+
}, {
|
100
|
+
"hour": "23",
|
101
|
+
"max_usage": 2,
|
102
|
+
"total_usage": 3
|
103
|
+
}]
|
104
|
+
}]
|
105
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"uuid": "t13b6hjVQXybvGKyeHC96w==",
|
3
|
+
"id": 3035575664,
|
4
|
+
"type": "Live Meeting",
|
5
|
+
"host": "Some User",
|
6
|
+
"email": "some_user@some_domain.com",
|
7
|
+
"user_type": "Pro",
|
8
|
+
"start_time": "2016-09-27T12:02:26Z",
|
9
|
+
"end_time": "",
|
10
|
+
"duration": null,
|
11
|
+
"has_pstn": false,
|
12
|
+
"has_voip": true,
|
13
|
+
"has_3rd_party_audio": false,
|
14
|
+
"has_video": true,
|
15
|
+
"has_screen_share": false,
|
16
|
+
"recording": 0,
|
17
|
+
"participants_count": 7,
|
18
|
+
"page_count": 7,
|
19
|
+
"page_number": 1,
|
20
|
+
"page_size": 1,
|
21
|
+
"participants": [{
|
22
|
+
"user_id": "16778240",
|
23
|
+
"user_name": "SOMEUSER",
|
24
|
+
"device": "Windows",
|
25
|
+
"ip_address": "11.111.111.111",
|
26
|
+
"cn": "US",
|
27
|
+
"city": "",
|
28
|
+
"network_type": "Wifi",
|
29
|
+
"join_time": "2016-09-27T12:02:26Z",
|
30
|
+
"leave_time": "2016-09-27T12:39:10Z"
|
31
|
+
}]
|
32
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"from": "2016-09-26",
|
3
|
+
"to": "2016-09-27",
|
4
|
+
"page_count": 19,
|
5
|
+
"page_number": 1,
|
6
|
+
"page_size": 1,
|
7
|
+
"total_records": 1,
|
8
|
+
"type": "Live Meetings",
|
9
|
+
"meetings": [{
|
10
|
+
"uuid": "t13b6hjVQXybvGKyeHC96w==",
|
11
|
+
"id": 3035575664,
|
12
|
+
"host": "Some User",
|
13
|
+
"email": "some_user@some_domain.com",
|
14
|
+
"user_type": "Pro",
|
15
|
+
"start_time": "2016-09-27T12:02:26Z",
|
16
|
+
"end_time": "",
|
17
|
+
"duration": "",
|
18
|
+
"participants": 2,
|
19
|
+
"has_pstn": false,
|
20
|
+
"has_voip": true,
|
21
|
+
"has_3rd_party_audio": false,
|
22
|
+
"has_video": true,
|
23
|
+
"has_screen_share": false,
|
24
|
+
"recording": 0
|
25
|
+
}]
|
26
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"year": 2017,
|
3
|
+
"month": 7,
|
4
|
+
"dates": [{
|
5
|
+
"date": "2017-07-01",
|
6
|
+
"new_user": 3,
|
7
|
+
"meetings": 91,
|
8
|
+
"participants": 718,
|
9
|
+
"meeting_minutes": 23727
|
10
|
+
}, {
|
11
|
+
"date": "2017-07-02",
|
12
|
+
"new_user": 2,
|
13
|
+
"meetings": 58,
|
14
|
+
"participants": 386,
|
15
|
+
"meeting_minutes": 11231
|
16
|
+
}, {
|
17
|
+
"date": "2017-07-03",
|
18
|
+
"new_user": 30,
|
19
|
+
"meetings": 949,
|
20
|
+
"participants": 5659,
|
21
|
+
"meeting_minutes": 181850
|
22
|
+
}, {
|
23
|
+
"date": "2017-07-04",
|
24
|
+
"new_user": 15,
|
25
|
+
"meetings": 406,
|
26
|
+
"participants": 2285,
|
27
|
+
"meeting_minutes": 84995
|
28
|
+
}, {
|
29
|
+
"date": "2017-07-05",
|
30
|
+
"new_user": 20,
|
31
|
+
"meetings": 1689,
|
32
|
+
"participants": 11412,
|
33
|
+
"meeting_minutes": 356152
|
34
|
+
}, {
|
35
|
+
"date": "2017-07-06",
|
36
|
+
"new_user": 35,
|
37
|
+
"meetings": 1973,
|
38
|
+
"participants": 13602,
|
39
|
+
"meeting_minutes": 420625
|
40
|
+
}, {
|
41
|
+
"date": "2017-07-07",
|
42
|
+
"new_user": 35,
|
43
|
+
"meetings": 1804,
|
44
|
+
"participants": 12636,
|
45
|
+
"meeting_minutes": 401873
|
46
|
+
}, {
|
47
|
+
"date": "2017-07-08",
|
48
|
+
"new_user": 8,
|
49
|
+
"meetings": 95,
|
50
|
+
"participants": 640,
|
51
|
+
"meeting_minutes": 20480
|
52
|
+
}, {
|
53
|
+
"date": "2017-07-09",
|
54
|
+
"new_user": 1,
|
55
|
+
"meetings": 58,
|
56
|
+
"participants": 479,
|
57
|
+
"meeting_minutes": 28310
|
58
|
+
}, {
|
59
|
+
"date": "2017-07-10",
|
60
|
+
"new_user": 32,
|
61
|
+
"meetings": 1724,
|
62
|
+
"participants": 11584,
|
63
|
+
"meeting_minutes": 369700
|
64
|
+
}, {
|
65
|
+
"date": "2017-07-11",
|
66
|
+
"new_user": 39,
|
67
|
+
"meetings": 1920,
|
68
|
+
"participants": 13734,
|
69
|
+
"meeting_minutes": 431274
|
70
|
+
}, {
|
71
|
+
"date": "2017-07-12",
|
72
|
+
"new_user": 46,
|
73
|
+
"meetings": 1896,
|
74
|
+
"participants": 12954,
|
75
|
+
"meeting_minutes": 417033
|
76
|
+
}, {
|
77
|
+
"date": "2017-07-13",
|
78
|
+
"new_user": 29,
|
79
|
+
"meetings": 834,
|
80
|
+
"participants": 5366,
|
81
|
+
"meeting_minutes": 164558
|
82
|
+
}]
|
83
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Metrics do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:from => '2013-04-05T15:50:47Z',
|
8
|
+
:to => '2013-04-09T19:00:00Z'}
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "#metrics_crc action" do
|
12
|
+
before :each do
|
13
|
+
stub_request(
|
14
|
+
:post,
|
15
|
+
zoomus_url("/metrics/crc")
|
16
|
+
).to_return(:body => json_response("metrics_crc"))
|
17
|
+
end
|
18
|
+
|
19
|
+
it "requires a 'from' argument" do
|
20
|
+
expect { @zc.metrics_crc(filter_key(@args, :from)) }.to raise_error(ArgumentError)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "requires a 'to' argument" do
|
24
|
+
expect { @zc.metrics_crc(filter_key(@args, :to)) }.to raise_error(ArgumentError)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "returns a hash" do
|
28
|
+
expect(@zc.metrics_crc(@args)).to be_kind_of(Hash)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#metrics_crc! action" do
|
33
|
+
before :each do
|
34
|
+
stub_request(
|
35
|
+
:post,
|
36
|
+
zoomus_url("/metrics/crc")
|
37
|
+
).to_return(:body => json_response("error"))
|
38
|
+
end
|
39
|
+
|
40
|
+
it "raises Zoomus::Error exception" do
|
41
|
+
expect {
|
42
|
+
@zc.metrics_crc!(@args)
|
43
|
+
}.to raise_error(Zoomus::Error)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Metrics do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = { meeting_id: 't13b6hjVQXybvGKyeHC96w==', type: 1 }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#metrics_meetingdetail action" do
|
11
|
+
before :each do
|
12
|
+
stub_request(
|
13
|
+
:post,
|
14
|
+
zoomus_url("/metrics/meetingdetail")
|
15
|
+
).to_return(:body => json_response("metrics_meetingdetail"))
|
16
|
+
end
|
17
|
+
|
18
|
+
it "requires a 'meeting_id' argument" do
|
19
|
+
expect { @zc.metrics_meetingdetail(filter_key(@args, :meeting_id)) }.to raise_error(ArgumentError)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "requires a 'type' argument" do
|
23
|
+
expect { @zc.metrics_meetingdetail(filter_key(@args, :type)) }.to raise_error(ArgumentError)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns a hash" do
|
27
|
+
expect(@zc.metrics_meetingdetail(@args)).to be_kind_of(Hash)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "returns 'participants' Array" do
|
31
|
+
expect(@zc.metrics_meetingdetail(@args)["participants"]).to be_kind_of(Array)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "#metrics_meetingdetail! action" do
|
36
|
+
before :each do
|
37
|
+
stub_request(
|
38
|
+
:post,
|
39
|
+
zoomus_url("/metrics/meetingdetail")
|
40
|
+
).to_return(:body => json_response("error"))
|
41
|
+
end
|
42
|
+
|
43
|
+
it "raises Zoomus::Error exception" do
|
44
|
+
expect {
|
45
|
+
@zc.metrics_meetingdetail!(@args)
|
46
|
+
}.to raise_error(Zoomus::Error)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Metrics do
|
4
|
+
|
5
|
+
before :all do
|
6
|
+
@zc = zoomus_client
|
7
|
+
@args = {:type => 1,
|
8
|
+
:from => '2013-04-05T15:50:47Z',
|
9
|
+
:to => '2013-04-09T19:00:00Z'}
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#metrics_meetings action" do
|
13
|
+
before :each do
|
14
|
+
stub_request(
|
15
|
+
:post,
|
16
|
+
zoomus_url("/metrics/meetings")
|
17
|
+
).to_return(:body => json_response("metrics_meetings"))
|
18
|
+
end
|
19
|
+
|
20
|
+
it "requires a 'type' argument" do
|
21
|
+
expect { @zc.metrics_meetings(filter_key(@args, :type)) }.to raise_error(ArgumentError)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "requires a 'from' argument" do
|
25
|
+
expect { @zc.metrics_meetings(filter_key(@args, :from)) }.to raise_error(ArgumentError)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "requires a 'to' argument" do
|
29
|
+
expect { @zc.metrics_meetings(filter_key(@args, :to)) }.to raise_error(ArgumentError)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "returns a hash" do
|
33
|
+
expect(@zc.metrics_meetings(@args)).to be_kind_of(Hash)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "returns 'total_records'" do
|
37
|
+
expect(@zc.metrics_meetings(@args)["total_records"]).to eq(1)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "returns 'meetings' Array" do
|
41
|
+
expect(@zc.metrics_meetings(@args)["meetings"]).to be_kind_of(Array)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "#metrics_meetings! action" do
|
46
|
+
before :each do
|
47
|
+
stub_request(
|
48
|
+
:post,
|
49
|
+
zoomus_url("/metrics/meetings")
|
50
|
+
).to_return(:body => json_response("error"))
|
51
|
+
end
|
52
|
+
|
53
|
+
it "raises Zoomus::Error exception" do
|
54
|
+
expect {
|
55
|
+
@zc.metrics_meetings!(@args)
|
56
|
+
}.to raise_error(Zoomus::Error)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Zoomus::Actions::Report do
|
4
|
+
before :all do
|
5
|
+
@zc = zoomus_client
|
6
|
+
@args = { year: 2017, month: 7 }
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#report_getdailyreport action' do
|
10
|
+
before :each do
|
11
|
+
stub_request(
|
12
|
+
:post,
|
13
|
+
zoomus_url('/report/getdailyreport')
|
14
|
+
).to_return(:body => json_response('report_getdailyreport'))
|
15
|
+
end
|
16
|
+
|
17
|
+
it "requires a 'year' argument" do
|
18
|
+
expect {
|
19
|
+
@zc.report_getdailyreport(filter_key(@args, :year))
|
20
|
+
}.to raise_error(ArgumentError)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "requires a 'month' argument" do
|
24
|
+
expect {
|
25
|
+
@zc.report_getdailyreport(filter_key(@args, :month))
|
26
|
+
}.to raise_error(ArgumentError)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "returs a Hash" do
|
30
|
+
expect(@zc.report_getdailyreport(@args)).to be_kind_of(Hash)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "returns a 'year'" do
|
34
|
+
expect(@zc.report_getdailyreport(@args)['year']).to eq(@args[:year])
|
35
|
+
end
|
36
|
+
|
37
|
+
it "returns a 'month'" do
|
38
|
+
expect(@zc.report_getdailyreport(@args)['month']).to eq(@args[:month])
|
39
|
+
end
|
40
|
+
|
41
|
+
it "returns a 'dates' Array" do
|
42
|
+
expect(@zc.report_getdailyreport(@args)['dates']).to be_kind_of(Array)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#report_getdailyreport! action" do
|
47
|
+
before :each do
|
48
|
+
stub_request(
|
49
|
+
:post,
|
50
|
+
zoomus_url("/report/getdailyreport")
|
51
|
+
).to_return(:body => json_response("error"))
|
52
|
+
end
|
53
|
+
|
54
|
+
it "raises Zoomus::Error exception" do
|
55
|
+
expect {
|
56
|
+
@zc.report_getdailyreport!(@args)
|
57
|
+
}.to raise_error(Zoomus::Error)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -17,10 +17,6 @@ describe Zoomus::Actions::User do
|
|
17
17
|
expect{@zc.user_getbyemail(filter_key(@args, :email))}.to raise_error(ArgumentError)
|
18
18
|
end
|
19
19
|
|
20
|
-
it "requires login_type param" do
|
21
|
-
expect{@zc.user_getbyemail(filter_key(@args, :login_type))}.to raise_error(ArgumentError)
|
22
|
-
end
|
23
|
-
|
24
20
|
it "returns a hash" do
|
25
21
|
expect(@zc.user_getbyemail(@args)).to be_kind_of(Hash)
|
26
22
|
end
|
data/zoomus.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
|
5
5
|
gem.add_dependency 'httparty', '~> 0.13'
|
6
|
-
gem.add_dependency 'json', '
|
6
|
+
gem.add_dependency 'json', '>= 1.8'
|
7
7
|
|
8
8
|
gem.add_development_dependency 'byebug'
|
9
9
|
gem.add_development_dependency 'rspec'
|
@@ -21,5 +21,5 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
22
22
|
gem.name = 'zoomus'
|
23
23
|
gem.require_paths = ['lib']
|
24
|
-
gem.version = '0.
|
24
|
+
gem.version = '0.6.0'
|
25
25
|
end
|
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.6.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: 2017-
|
11
|
+
date: 2017-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.8'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -88,12 +88,15 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
|
+
- ".ruby-version"
|
92
|
+
- ".travis.yml"
|
91
93
|
- Gemfile
|
92
94
|
- LICENSE
|
93
95
|
- Makefile
|
94
96
|
- README.md
|
95
97
|
- lib/zoomus.rb
|
96
98
|
- lib/zoomus/actions/meeting.rb
|
99
|
+
- lib/zoomus/actions/metrics.rb
|
97
100
|
- lib/zoomus/actions/recording.rb
|
98
101
|
- lib/zoomus/actions/report.rb
|
99
102
|
- lib/zoomus/actions/user.rb
|
@@ -109,10 +112,14 @@ files:
|
|
109
112
|
- spec/fixtures/meeting_get.json
|
110
113
|
- spec/fixtures/meeting_list.json
|
111
114
|
- spec/fixtures/meeting_update.json
|
115
|
+
- spec/fixtures/metrics_crc.json
|
116
|
+
- spec/fixtures/metrics_meetingdetail.json
|
117
|
+
- spec/fixtures/metrics_meetings.json
|
112
118
|
- spec/fixtures/recording_delete.json
|
113
119
|
- spec/fixtures/recording_get.json
|
114
120
|
- spec/fixtures/recording_list.json
|
115
121
|
- spec/fixtures/report_getaccountreport.json
|
122
|
+
- spec/fixtures/report_getdailyreport.json
|
116
123
|
- spec/fixtures/report_getuserreport.json
|
117
124
|
- spec/fixtures/user_autocreate.json
|
118
125
|
- spec/fixtures/user_create.json
|
@@ -134,11 +141,15 @@ files:
|
|
134
141
|
- spec/lib/zoomus/actions/meeting/get_spec.rb
|
135
142
|
- spec/lib/zoomus/actions/meeting/list_spec.rb
|
136
143
|
- spec/lib/zoomus/actions/meeting/update_spec.rb
|
144
|
+
- spec/lib/zoomus/actions/metrics/crc_spec.rb
|
145
|
+
- spec/lib/zoomus/actions/metrics/meetingdetail_spec.rb
|
146
|
+
- spec/lib/zoomus/actions/metrics/meetings_spec.rb
|
137
147
|
- spec/lib/zoomus/actions/recording/delete_spec.rb
|
138
148
|
- spec/lib/zoomus/actions/recording/get_spec.rb
|
139
149
|
- spec/lib/zoomus/actions/recording/list_spec.rb
|
140
150
|
- spec/lib/zoomus/actions/recording/mc_list_spec.rb
|
141
151
|
- spec/lib/zoomus/actions/report/getaccountreport_spec.rb
|
152
|
+
- spec/lib/zoomus/actions/report/getdailyreport_spec.rb
|
142
153
|
- spec/lib/zoomus/actions/report/getuserreport_spec.rb
|
143
154
|
- spec/lib/zoomus/actions/user/autocreate2_spec.rb
|
144
155
|
- spec/lib/zoomus/actions/user/autocreate_spec.rb
|
@@ -179,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
190
|
version: '0'
|
180
191
|
requirements: []
|
181
192
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.4.5.1
|
183
194
|
signing_key:
|
184
195
|
specification_version: 4
|
185
196
|
summary: zoom.us API wrapper
|
@@ -191,10 +202,14 @@ test_files:
|
|
191
202
|
- spec/fixtures/meeting_get.json
|
192
203
|
- spec/fixtures/meeting_list.json
|
193
204
|
- spec/fixtures/meeting_update.json
|
205
|
+
- spec/fixtures/metrics_crc.json
|
206
|
+
- spec/fixtures/metrics_meetingdetail.json
|
207
|
+
- spec/fixtures/metrics_meetings.json
|
194
208
|
- spec/fixtures/recording_delete.json
|
195
209
|
- spec/fixtures/recording_get.json
|
196
210
|
- spec/fixtures/recording_list.json
|
197
211
|
- spec/fixtures/report_getaccountreport.json
|
212
|
+
- spec/fixtures/report_getdailyreport.json
|
198
213
|
- spec/fixtures/report_getuserreport.json
|
199
214
|
- spec/fixtures/user_autocreate.json
|
200
215
|
- spec/fixtures/user_create.json
|
@@ -216,11 +231,15 @@ test_files:
|
|
216
231
|
- spec/lib/zoomus/actions/meeting/get_spec.rb
|
217
232
|
- spec/lib/zoomus/actions/meeting/list_spec.rb
|
218
233
|
- spec/lib/zoomus/actions/meeting/update_spec.rb
|
234
|
+
- spec/lib/zoomus/actions/metrics/crc_spec.rb
|
235
|
+
- spec/lib/zoomus/actions/metrics/meetingdetail_spec.rb
|
236
|
+
- spec/lib/zoomus/actions/metrics/meetings_spec.rb
|
219
237
|
- spec/lib/zoomus/actions/recording/delete_spec.rb
|
220
238
|
- spec/lib/zoomus/actions/recording/get_spec.rb
|
221
239
|
- spec/lib/zoomus/actions/recording/list_spec.rb
|
222
240
|
- spec/lib/zoomus/actions/recording/mc_list_spec.rb
|
223
241
|
- spec/lib/zoomus/actions/report/getaccountreport_spec.rb
|
242
|
+
- spec/lib/zoomus/actions/report/getdailyreport_spec.rb
|
224
243
|
- spec/lib/zoomus/actions/report/getuserreport_spec.rb
|
225
244
|
- spec/lib/zoomus/actions/user/autocreate2_spec.rb
|
226
245
|
- spec/lib/zoomus/actions/user/autocreate_spec.rb
|