webex 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +21 -0
- data/lib/core_ext/string.rb +9 -0
- data/lib/webex.rb +1 -0
- data/lib/webex/meeting.rb +3 -0
- data/lib/webex/meeting/action.rb +13 -12
- data/lib/webex/meeting/attendee.rb +7 -6
- data/lib/webex/meeting/presenter.rb +7 -4
- data/lib/webex/meeting/registration.rb +5 -4
- data/lib/webex/meeting/report.rb +4 -2
- data/lib/webex/meeting/schedule.rb +7 -7
- data/lib/webex/user.rb +3 -0
- data/lib/webex/user/activation.rb +5 -4
- data/lib/webex/user/file.rb +6 -4
- data/lib/webex/user/partner.rb +5 -4
- data/lib/webex/user/registration.rb +6 -4
- data/lib/webex/user/report.rb +3 -2
- data/lib/webex/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4093231ff4b1b1a8defd1607da6e443543dd5352
|
4
|
+
data.tar.gz: 62436e6a2d9d2015aa0684ef4d308a06b5f28b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5a4e465e69bb187de34ab874ee9cbea9eec075d137572ecef54038c4a3c4a01eae6c8b2b32a50a0a7bb85d71ea90863ee325747f6dd8638af036e31d9d471d2
|
7
|
+
data.tar.gz: 134404a621092f5a872987d26f20450bacf9121444579a493fdc89c7324bdfeb457c11edea253f9b6d4d9545f0f2946e39345063a6d1341b1b3382fde62e4c7e
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) <year> <copyright holders>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'active_support/core_ext/hash'
|
2
|
+
class String
|
3
|
+
def stringify_string
|
4
|
+
hash = Hash.from_xml(self)
|
5
|
+
"ST=#{hash['ListOpenMeetings']['Status']}&RS=#{hash['ListOpenMeetings']['Reason']}&MeetingKeys=#{hash['ListOpenMeetings']['MeetingKeys']}"
|
6
|
+
rescue
|
7
|
+
match(/(var url = |window.location.replace\()\"(.*)\"/)[2].gsub!('\\x3a',':').gsub!('\\x2f','/').gsub!('\\x3f','?').gsub!('\\x3d','=').gsub!('\\x26','&').split('?').last
|
8
|
+
end
|
9
|
+
end
|
data/lib/webex.rb
CHANGED
data/lib/webex/meeting.rb
CHANGED
data/lib/webex/meeting/action.rb
CHANGED
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Action
|
5
5
|
include Webex
|
6
|
+
include Webex::Meeting
|
6
7
|
attr_accessor :meeting_key, :cancel_mail, :back_url,
|
7
8
|
:start_feature, :app_handle, :location, :parameter, :url, :document_location,
|
8
9
|
:attendee_name, :attendee_mail, :phone, :password, :registration_id
|
@@ -14,35 +15,35 @@ module Webex
|
|
14
15
|
|
15
16
|
def delete
|
16
17
|
option_required! :meeting_key
|
17
|
-
|
18
|
-
|
18
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'DM')
|
19
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
19
20
|
end
|
20
21
|
|
21
22
|
def host
|
22
23
|
option_required! :meeting_key
|
23
|
-
|
24
|
-
|
24
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'HM')
|
25
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
25
26
|
end
|
26
27
|
|
27
28
|
def join
|
28
29
|
option_required! :meeting_key
|
29
|
-
|
30
|
-
|
30
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'JM')
|
31
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
31
32
|
end
|
32
33
|
|
33
34
|
def list_meetings
|
34
|
-
|
35
|
-
|
35
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'LM')
|
36
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
36
37
|
end
|
37
38
|
|
38
39
|
def list_open_meetings
|
39
|
-
|
40
|
-
|
40
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'OM')
|
41
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
41
42
|
end
|
42
43
|
|
43
44
|
def schedule
|
44
|
-
|
45
|
-
|
45
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'SM')
|
46
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
46
47
|
end
|
47
48
|
|
48
49
|
private
|
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Attendee
|
5
5
|
include Webex
|
6
|
+
include Webex::Meeting
|
6
7
|
attr_accessor :meeting_key, :back_url, :invitation, :attendees, :cancel_mail, :email
|
7
8
|
|
8
9
|
# attendees: [{FullName: FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil},
|
@@ -16,20 +17,20 @@ module Webex
|
|
16
17
|
|
17
18
|
def add
|
18
19
|
option_required! :attendees
|
19
|
-
|
20
|
-
|
20
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'AA')
|
21
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
21
22
|
end
|
22
23
|
|
23
24
|
def delete
|
24
25
|
option_required! :email
|
25
|
-
|
26
|
-
|
26
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'DA')
|
27
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
27
28
|
end
|
28
29
|
|
29
30
|
def detail
|
30
31
|
option_required! :email
|
31
|
-
|
32
|
-
|
32
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'MD')
|
33
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
33
34
|
end
|
34
35
|
|
35
36
|
private
|
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Presenter
|
5
5
|
include Webex
|
6
|
+
include Webex::Meeting
|
6
7
|
attr_accessor :meeting_key, :back_url, :email, :full_name, :invitation,
|
7
8
|
:phones, :cancel_mail
|
8
9
|
# phones = {PhoneCountry: nil, PhoneArea: nil, PhoneNumber: nil, PhoneExt: nil}
|
@@ -15,13 +16,15 @@ module Webex
|
|
15
16
|
|
16
17
|
def add
|
17
18
|
option_required! :full_name
|
18
|
-
|
19
|
-
|
19
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'AP')
|
20
|
+
p res.body
|
21
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
20
22
|
end
|
21
23
|
|
22
24
|
def delete
|
23
|
-
|
24
|
-
|
25
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'DP')
|
26
|
+
p res.body
|
27
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
25
28
|
end
|
26
29
|
|
27
30
|
private
|
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Registration
|
5
5
|
include Webex
|
6
|
+
include Webex::Meeting
|
6
7
|
attr_accessor :meeting_key, :back_url, :first_name, :last_name, :email_address, :job_title,
|
7
8
|
:computer_name, :address_1, :address_2, :city, :state, :zip_code, :country,
|
8
9
|
:phone_number, :fax, :name_and_values, :text_box_contents, :check_box_contents,
|
@@ -16,14 +17,14 @@ module Webex
|
|
16
17
|
|
17
18
|
def form
|
18
19
|
option_required! :meeting_key
|
19
|
-
|
20
|
-
|
20
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'GF')
|
21
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
21
22
|
end
|
22
23
|
|
23
24
|
def register
|
24
25
|
option_required! :meeting_key, :first_name, :last_name, :email_address, :job_title, :computer_name
|
25
|
-
|
26
|
-
|
26
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'RM')
|
27
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
27
28
|
end
|
28
29
|
|
29
30
|
private
|
data/lib/webex/meeting/report.rb
CHANGED
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Report
|
5
5
|
include Webex
|
6
|
+
include Webex::Meeting
|
6
7
|
attr_accessor :recording_topic, :specify_url, :agenda, :registration,
|
7
8
|
:destination_address_after_session, :description, :email_address,
|
8
9
|
:duration_hours, :duration_minutes, :month, :year, :presenter,
|
@@ -18,8 +19,9 @@ module Webex
|
|
18
19
|
|
19
20
|
def create
|
20
21
|
option_required! :recording_topic
|
21
|
-
|
22
|
-
|
22
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'CR')
|
23
|
+
p res.body
|
24
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Schedule
|
5
5
|
include Webex
|
6
|
+
include Webex::Meeting
|
6
7
|
attr_accessor :meeting_name, :meeting_type, :list_flag, :meeting_password, :password_filter_feature,
|
7
8
|
:require_attendee_registration, :automatically_accept_registration, :attendee_information,
|
8
9
|
:registration_password, :maxinum_registrations_allowed, :registration_close_year, :registration_close_month,
|
@@ -31,21 +32,20 @@ module Webex
|
|
31
32
|
end
|
32
33
|
|
33
34
|
def edit
|
34
|
-
|
35
|
-
|
35
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'EM')
|
36
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
36
37
|
end
|
37
38
|
|
38
39
|
def schedule
|
39
|
-
|
40
|
-
|
40
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'SM')
|
41
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
41
42
|
end
|
42
43
|
|
43
44
|
def impromptu
|
44
|
-
|
45
|
-
|
45
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'IM')
|
46
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
46
47
|
end
|
47
48
|
|
48
|
-
|
49
49
|
private
|
50
50
|
|
51
51
|
def generate_params(overwrite_params = {})
|
data/lib/webex/user.rb
CHANGED
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Activation
|
5
5
|
include Webex
|
6
|
+
include Webex::User
|
6
7
|
attr_accessor :webex_id, :partner_id, :back_url
|
7
8
|
|
8
9
|
def initialize(attributes = {})
|
@@ -12,13 +13,13 @@ module Webex
|
|
12
13
|
end
|
13
14
|
|
14
15
|
def activate
|
15
|
-
|
16
|
-
|
16
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'AC')
|
17
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
17
18
|
end
|
18
19
|
|
19
20
|
def deactivate
|
20
|
-
|
21
|
-
|
21
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'IN')
|
22
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
data/lib/webex/user/file.rb
CHANGED
@@ -3,6 +3,8 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class File
|
5
5
|
include Webex
|
6
|
+
include Webex::User
|
7
|
+
|
6
8
|
attr_accessor :file_name, :back_url, :current_directory
|
7
9
|
|
8
10
|
def initialize(attributes = {})
|
@@ -13,13 +15,13 @@ module Webex
|
|
13
15
|
|
14
16
|
def download
|
15
17
|
option_required! :file_name
|
16
|
-
|
17
|
-
|
18
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'DF')
|
19
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
18
20
|
end
|
19
21
|
|
20
22
|
def list
|
21
|
-
|
22
|
-
|
23
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'LF')
|
24
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
data/lib/webex/user/partner.rb
CHANGED
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Partner
|
5
5
|
include Webex
|
6
|
+
include Webex::User
|
6
7
|
attr_accessor :webex_id, :ticket, :password, :back_type, :back_url, :email,
|
7
8
|
:session, :first_name, :last_name, :new_password
|
8
9
|
def initialize(attributes = {})
|
@@ -12,13 +13,13 @@ module Webex
|
|
12
13
|
end
|
13
14
|
|
14
15
|
def login
|
15
|
-
|
16
|
-
|
16
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'LI')
|
17
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
17
18
|
end
|
18
19
|
|
19
20
|
def logout
|
20
|
-
|
21
|
-
|
21
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'LO')
|
22
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
@@ -3,6 +3,8 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Registration
|
5
5
|
include Webex
|
6
|
+
include Webex::User
|
7
|
+
|
6
8
|
attr_accessor :webex_id, :first_name, :last_name, :email, :password, :partner_id, :back_url,
|
7
9
|
# optional attributes
|
8
10
|
:address_1, :address_2, :city, :state, :zip_code, :country, :office_phones, :fax_phones,
|
@@ -28,14 +30,14 @@ module Webex
|
|
28
30
|
|
29
31
|
def sign_up(condition={})
|
30
32
|
option_required! :webex_id, :first_name, :last_name, :email, :password, :partner_id
|
31
|
-
|
32
|
-
|
33
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'SU')
|
34
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
33
35
|
end
|
34
36
|
|
35
37
|
def edit(condition={})
|
36
38
|
option_required! :webex_id, :password, :partner_id
|
37
|
-
|
38
|
-
|
39
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'EU')
|
40
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
39
41
|
end
|
40
42
|
|
41
43
|
private
|
data/lib/webex/user/report.rb
CHANGED
@@ -3,6 +3,7 @@ module Webex
|
|
3
3
|
# comment
|
4
4
|
class Report
|
5
5
|
include Webex
|
6
|
+
include Webex::User
|
6
7
|
attr_accessor :report_type, :back_url, :start_month, :start_year, :start_date,
|
7
8
|
:end_month, :end_year, :end_date, :topic, :sort_result_by
|
8
9
|
|
@@ -13,8 +14,8 @@ module Webex
|
|
13
14
|
end
|
14
15
|
|
15
16
|
def display
|
16
|
-
|
17
|
-
|
17
|
+
res = Net::HTTP.post_form post_url, generate_params(api_type: 'QR')
|
18
|
+
Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }]
|
18
19
|
end
|
19
20
|
|
20
21
|
private
|
data/lib/webex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wei-Yi Chiu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- .rspec
|
78
78
|
- .travis.yml
|
79
79
|
- Gemfile
|
80
|
+
- LICENSE.txt
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|
82
83
|
- bin/console
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- example/views/user/partner/logout.erb
|
88
89
|
- example/views/user/registration/edit.erb
|
89
90
|
- example/views/user/registration/sign_up.erb
|
91
|
+
- lib/core_ext/string.rb
|
90
92
|
- lib/webex.rb
|
91
93
|
- lib/webex/configuration.rb
|
92
94
|
- lib/webex/error/errors.rb
|