wiziq-ruby 0.0.1
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.
- data/.gitignore +4 -0
- data/.rvmrc +1 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +25 -0
- data/Rakefile +30 -0
- data/lib/wiziq.rb +204 -0
- data/lib/wiziq/version.rb +3 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/wiziq_spec.rb +48 -0
- data/test/helper.rb +18 -0
- data/test/test_wiziq.rb +100 -0
- data/wiziq-ruby.gemspec +36 -0
- metadata +170 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm gemset use 1.9.2-p180@wiziq-ruby
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Lee Horrocks
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
= wiziq-ruby
|
2
|
+
|
3
|
+
Wiziq is a Ruby gem that provides a wrapper for interacting with the {WiZiQ API}[http://org.wiziq.com/api/].
|
4
|
+
|
5
|
+
Still very beta...
|
6
|
+
|
7
|
+
== Requirements
|
8
|
+
|
9
|
+
You will need a {WiZiQ}[http://org.wiziq.com] account.
|
10
|
+
|
11
|
+
== Installation
|
12
|
+
|
13
|
+
(sudo) gem install wiziq
|
14
|
+
|
15
|
+
== Usage
|
16
|
+
|
17
|
+
Please refer to the {Wiziq API Documentation}[http://org.wiziq.com/api/] for information about what methods are available, the arguments that can be passed to each method, and the output that the API will return.
|
18
|
+
|
19
|
+
== Examples
|
20
|
+
TBD
|
21
|
+
|
22
|
+
== Copyright
|
23
|
+
|
24
|
+
Copyright (c) 2011 Lee Horrocks. See LICENSE.txt for further details.
|
25
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
Bundler::GemHelper.install_tasks
|
4
|
+
|
5
|
+
require 'rake/testtask'
|
6
|
+
Rake::TestTask.new(:test) do |test|
|
7
|
+
test.libs << 'lib' << 'test'
|
8
|
+
test.pattern = 'test/**/test_*.rb'
|
9
|
+
test.verbose = true
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'rcov/rcovtask'
|
13
|
+
Rcov::RcovTask.new do |test|
|
14
|
+
test.libs << 'test'
|
15
|
+
test.pattern = 'test/**/test_*.rb'
|
16
|
+
test.verbose = true
|
17
|
+
test.rcov_opts << '--exclude "gems/*"'
|
18
|
+
end
|
19
|
+
|
20
|
+
task :default => :test
|
21
|
+
|
22
|
+
require 'rake/rdoctask'
|
23
|
+
Rake::RDocTask.new do |rdoc|
|
24
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
25
|
+
|
26
|
+
rdoc.rdoc_dir = 'rdoc'
|
27
|
+
rdoc.title = "asf #{version}"
|
28
|
+
rdoc.rdoc_files.include('README*')
|
29
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
30
|
+
end
|
data/lib/wiziq.rb
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
require 'savon'
|
2
|
+
require 'nokogiri'
|
3
|
+
require 'net/http'
|
4
|
+
|
5
|
+
module Wiziq
|
6
|
+
class API
|
7
|
+
|
8
|
+
# Blank Slate
|
9
|
+
instance_methods.each do |m|
|
10
|
+
undef_method m unless m.to_s =~ /^__|object_id|method_missing|respond_to?|to_s|inspect/
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(username, password)
|
14
|
+
raise ArgumentError.new('You must provide a username.') if username.nil?
|
15
|
+
raise ArgumentError.new('You must provide a password.') if password.nil?
|
16
|
+
|
17
|
+
Savon.configure do |config|
|
18
|
+
config.log = true # disable logging
|
19
|
+
config.log_level = :debug # changing the log level
|
20
|
+
#config.logger = Rails.logger # using the Rails logger
|
21
|
+
end
|
22
|
+
|
23
|
+
@username = username
|
24
|
+
@password = password
|
25
|
+
|
26
|
+
# @logger = Logging.logger(STDOUT)
|
27
|
+
# @logger.level = :warn
|
28
|
+
#
|
29
|
+
@client = Savon::Client.new do
|
30
|
+
wsdl.document = "http://authorlive.com/aGLIVE/aGLive.asmx?WSDL"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
#:attendee_list => array("atnd1","atnd2"),
|
35
|
+
# API Method broken
|
36
|
+
def get_account_details
|
37
|
+
body = { :psz_usr => @username, :psz_pwd => @password }
|
38
|
+
|
39
|
+
response = call_api(:get_account_details, body)
|
40
|
+
|
41
|
+
puts "----------------------"
|
42
|
+
puts response.to_hash
|
43
|
+
puts "----------------------"
|
44
|
+
xml = response.to_hash[:get_account_details_response][:get_account_details_result]
|
45
|
+
puts "----------------------"
|
46
|
+
xml
|
47
|
+
# xml_doc = Nokogiri::XML(xml)
|
48
|
+
# puts xml_doc.to_s
|
49
|
+
# time_zone_ids = xml_doc.xpath("//ALW_TblTimeZones/@ID")
|
50
|
+
# time_zone_names = xml_doc.xpath("//ALW_TblTimeZones/@DisplayName")
|
51
|
+
# time_zone_hash = Hash.new
|
52
|
+
# time_zone_ids.each do |id|
|
53
|
+
# x = time_zone_ids.index(id)
|
54
|
+
# time_zone_hash[id.value] = time_zone_names[x].value
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# time_zone_hash
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
def schedule_new_event(args = {}, attendee_list = {})
|
62
|
+
#args[:attendee_list] = attendee_list
|
63
|
+
defaults = { 'UserName' => @username, 'Password' => @password }
|
64
|
+
# test = :user_code => 2, :event_name => 'Test schedule class 1', :date_time => '05/24/2011 01:00:00 pm', :time_zone => 23, :duration => 60, :is_extendable_by_mins => true, :extended_mins => 30, :max_users => 5, :video_size => 'notset', :description => 'Test schedule new event', :attendee_list => array("atnd1","atnd2"), :show_timer => true, :default_tab => 'p', :recoding_replay => true, :audio_quality => 2, :timer_type => false, :categorynumber => 4, :end_session_required => 'entrue'
|
65
|
+
event_details = defaults.merge(args)
|
66
|
+
body = { 'EventDetails' => event_details }
|
67
|
+
response = call_api(:schedule_new_event, body)
|
68
|
+
response.to_hash[:schedule_new_event_response][:schedule_new_event_result]
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
def update_event(args = {})
|
73
|
+
defaults = { 'UserName' => @username, 'Password' => @password }
|
74
|
+
event_details = defaults.merge(args)
|
75
|
+
body = { 'EventDetails' => event_details }
|
76
|
+
response = call_api(:update_new_event, body)
|
77
|
+
response.to_hash[:update_new_event_response][:update_new_event_result]
|
78
|
+
end
|
79
|
+
|
80
|
+
#DeleteEvent Web Method
|
81
|
+
def delete_event(session_code)
|
82
|
+
event_details = { :ln_ses_cod => session_code, :sz_usr_nam => @username, :sz_pwd => @password }
|
83
|
+
body = { 'pstEventDet' => event_details }
|
84
|
+
response = call_api(:delete_event, body)
|
85
|
+
response.to_hash[:delete_event_response][:delete_event_result]
|
86
|
+
end
|
87
|
+
|
88
|
+
#AddAttendeeToSession Web Method
|
89
|
+
def add_attendee_to_session(session_code, screenname)
|
90
|
+
app_credentials = { 'AppUserName' => @username, 'AppPassword' => @password }
|
91
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
92
|
+
xml.AddAttendeeToSession {
|
93
|
+
xml.SessionCode session_code
|
94
|
+
xml.Attendee {
|
95
|
+
xml.ID 1234
|
96
|
+
xml.ScreenName screenname
|
97
|
+
}
|
98
|
+
}
|
99
|
+
end
|
100
|
+
body = { 'AppCredentials' => app_credentials, 'AttendeeListXML' => builder.to_xml }
|
101
|
+
response = call_api(:add_attendee_to_session, body)
|
102
|
+
end
|
103
|
+
|
104
|
+
#AddAttendee Web Method
|
105
|
+
def add_attendee(session_code, screenname)
|
106
|
+
body = {'AttendeeList' => { 'SessionCode' => session_code, 'AttendeeList' => {'string' => screenname}}}
|
107
|
+
response = call_api(:add_attendee, body)
|
108
|
+
xml = response.to_hash[:add_attendee_response][:add_attendee_result][:attendee_urls]
|
109
|
+
xml_doc = Nokogiri::XML(xml)
|
110
|
+
screennames = xml_doc.xpath("//Attendee/@screenName")
|
111
|
+
urls = xml_doc.xpath("//Attendee/@Url")
|
112
|
+
resulthash = Hash.new
|
113
|
+
screennames.each do |screenname|
|
114
|
+
x = screennames.index(screenname)
|
115
|
+
resulthash[screenname.value] = urls[x].value
|
116
|
+
end
|
117
|
+
|
118
|
+
resulthash
|
119
|
+
end
|
120
|
+
|
121
|
+
#RemoveAttendee Web Method
|
122
|
+
def remove_attendee(session_code, screenname)
|
123
|
+
body = {'AttendeeList' => { 'SessionCode' => session_code, 'AttendeeList' => {'string' => screenname}}}
|
124
|
+
response = call_api(:remove_attendee, body)
|
125
|
+
response.to_hash[:remove_attendee_response][:remove_attendee_result]
|
126
|
+
end
|
127
|
+
|
128
|
+
#GetSessionAttendees Web Method
|
129
|
+
#-- Broken
|
130
|
+
def get_attendees(session_code)
|
131
|
+
# event_details = { 'SessionCode' => session_code, 'UserName' => @username, 'Password' => @password }
|
132
|
+
# body = { 'Account' => event_details }
|
133
|
+
# response = call_api(:get_session_attendees, body)
|
134
|
+
#response.to_hash[:get_session_attendees_response][:get_session_attendees_result]
|
135
|
+
end
|
136
|
+
|
137
|
+
|
138
|
+
def get_time_zones
|
139
|
+
body = { :psz_usr_nam => @username, :psz_pwd => @password }
|
140
|
+
response = call_api(:get_time_zones, body)
|
141
|
+
xml = response.to_hash[:get_time_zones_response][:get_time_zones_result]
|
142
|
+
xml_doc = Nokogiri::XML(xml)
|
143
|
+
time_zone_ids = xml_doc.xpath("//ALW_TblTimeZones/@ID")
|
144
|
+
time_zone_names = xml_doc.xpath("//ALW_TblTimeZones/@DisplayName")
|
145
|
+
time_zone_hash = Hash.new
|
146
|
+
time_zone_ids.each do |id|
|
147
|
+
x = time_zone_ids.index(id)
|
148
|
+
time_zone_hash[id.value.to_i] = time_zone_names[x].value
|
149
|
+
end
|
150
|
+
|
151
|
+
time_zone_hash
|
152
|
+
end
|
153
|
+
|
154
|
+
#Convert date from one timezone to another
|
155
|
+
# args: TZ 1 ID, TZ 2 ID, date: 2010-01-26T11:00:00
|
156
|
+
def convert_date(from, to, date)
|
157
|
+
|
158
|
+
body = { :pin_time_zone_from => from, :pint_time_zone_to => to, :pdt_date => date.strftime("%Y-%m-%dT%H:%M:%S") }
|
159
|
+
response = call_api(:convert_date, body)
|
160
|
+
converted_date = (response.to_hash[:convert_date_response][:convert_date_result]).to_s
|
161
|
+
DateTime.parse(converted_date)
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
def get_my_package
|
166
|
+
body = { 'UserName' => @username, 'Password' => @password }
|
167
|
+
response = call_api(:get_my_package, body)
|
168
|
+
xml = response.to_hash[:get_my_package_response][:get_my_package_result]
|
169
|
+
xml_doc = Nokogiri::XML(xml)
|
170
|
+
package = xml_doc.xpath("//Package/text()")
|
171
|
+
if package.nil?
|
172
|
+
package = xml_doc.xpath("//message/text()")
|
173
|
+
end
|
174
|
+
package
|
175
|
+
end
|
176
|
+
|
177
|
+
protected
|
178
|
+
#Call WiZiQ api methods
|
179
|
+
def call_api(method, body)
|
180
|
+
begin
|
181
|
+
response = @client.request(:wiziq, method) do
|
182
|
+
soap.namespaces["xmlns:SOAP-ENC"] = "http://schemas.xmlsoap.org/soap/encoding/"
|
183
|
+
soap.namespaces["env:encodingStyle"] = "http://schemas.xmlsoap.org/soap/encoding/"
|
184
|
+
soap.body = body
|
185
|
+
end
|
186
|
+
rescue Savon::Error => error
|
187
|
+
raise APIError.new(error.to_hash)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
class APIError < StandardError
|
193
|
+
def initialize(error)
|
194
|
+
super("#{error[:fault][:faultcode]}")
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
end
|
199
|
+
|
200
|
+
# class String
|
201
|
+
# def camelize_api_method_name
|
202
|
+
# self.to_s[0].chr.downcase + self.gsub(/(?:^|_)(.)/) { $1.upcase }[1..self.size]
|
203
|
+
# end
|
204
|
+
# end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
Savon::Spec::Fixture.path = File.expand_path("../fixtures", __FILE__)
|
4
|
+
|
5
|
+
require 'rspec'
|
6
|
+
require 'wiziq'
|
7
|
+
|
8
|
+
# Requires supporting files with custom matchers and macros, etc,
|
9
|
+
# in ./support/ and its subdirectories.
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.include Savon::Spec::Macros
|
14
|
+
# == Mock Framework
|
15
|
+
#
|
16
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
17
|
+
#
|
18
|
+
# config.mock_with :mocha
|
19
|
+
# config.mock_with :flexmock
|
20
|
+
# config.mock_with :rr
|
21
|
+
config.mock_with :rspec
|
22
|
+
|
23
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
24
|
+
# config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
25
|
+
|
26
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
27
|
+
# examples within a transaction, remove the following line or assign false
|
28
|
+
# instead of true.
|
29
|
+
# config.use_transactional_fixtures = true
|
30
|
+
|
31
|
+
#config.filter_run :focus => true
|
32
|
+
|
33
|
+
end
|
data/spec/wiziq_spec.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
module Wiziq
|
5
|
+
describe API do
|
6
|
+
|
7
|
+
# describe ".get_time_zones" do
|
8
|
+
# before do
|
9
|
+
# savon.expects(:get_time_zones).returns(:multiple_users)
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# it "should return an Array of Users" do
|
13
|
+
# User.all.each { |user| user.should be_a(User) }
|
14
|
+
# end
|
15
|
+
#
|
16
|
+
# it "should return exactly 7 Users" do
|
17
|
+
# User.all.should have(7).items
|
18
|
+
# end
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
# before(:all) do
|
22
|
+
# @username = "demoaccount"
|
23
|
+
# @password = "wiziq123"
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# it "should initialize" do
|
27
|
+
# API.respond_to?('new').should == true
|
28
|
+
# @wiziq = Wiziq::API.new(@username, @password)
|
29
|
+
# end
|
30
|
+
#
|
31
|
+
#
|
32
|
+
# it "should not raise an error if the username and password are correct" do
|
33
|
+
# wiziq = Wiziq::API.new(@username, @password)
|
34
|
+
# end
|
35
|
+
#
|
36
|
+
# it "should raise an error if the username and password are not provided" do
|
37
|
+
# # assert_raise(ArgumentError) do
|
38
|
+
# api = Wiziq::API.new(nil, nil)
|
39
|
+
# end
|
40
|
+
|
41
|
+
#it "should raise an error if the username and password are incorrect"
|
42
|
+
|
43
|
+
# it "should get time zones" do
|
44
|
+
# wiziq = Wiziq::API.new(@username, @password)
|
45
|
+
# wiziq.respond_to?('get_time_zones').should == true
|
46
|
+
# end
|
47
|
+
end
|
48
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'wiziq'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
data/test/test_wiziq.rb
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class TestWiziq < Test::Unit::TestCase
|
4
|
+
# should "probably rename this file and start testing for real" do
|
5
|
+
# flunk "hey buddy, you should probably rename this file and start testing for real"
|
6
|
+
# end
|
7
|
+
|
8
|
+
|
9
|
+
def setup
|
10
|
+
@username = "learnerhill"
|
11
|
+
@password = "password"
|
12
|
+
|
13
|
+
@wiziq = Wiziq::API.new(@username, @password)
|
14
|
+
end
|
15
|
+
#
|
16
|
+
# test "get time zones" do
|
17
|
+
# end
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
# Attendee_feedback_url' => '', 'presenter_feedback_url' => '', 'supporturl' => '', 'company_name' => 'your company name', 'presenter_name' => 'presenter name', 'presenter_label' => 'testphp', ,
|
22
|
+
# , 'enable_private_chat' => 'yes', 'company_url' => '', , , 'DefaultTab' => 'p'
|
23
|
+
|
24
|
+
def test_schedule_new_event
|
25
|
+
|
26
|
+
attendee_list = ["demoaccount"]
|
27
|
+
|
28
|
+
args = { 'UserCode' => '9953', 'IsExtendableByMins' => true, 'ExtendedMins' => 0, 'MaxUsers' => 5, 'VideoSize' => 'NotSet', 'PingTime' => 1, 'ShowTimer' => true, 'RecodingReplay' => true, 'AudioQuality' => 2, 'TimerType' => false, 'CategoryNumber' => 14, 'EndSessionRequired' => 'enFalse', 'AttendeeTimeZone' => 23, 'PresenterTimeZone' => 23, 'DisplayAttendeeLoginLogout' => 'enDisplay', 'BrowserCloseMsg' => 'enFalse', 'AttendeeContent' => 'enFalse', 'MathToolBar' => 'enFalse', 'ChatAlertSound' => 'true', 'ShowEraser' => 'enFalse', 'VideoSharing' => 'true', 'PrintRequired' => 'false', 'SmileysRequired' => 'true', 'ShowConnStatus' => 'false', 'ShowDisableChatButton' => 'false', 'SecureLogin' => 'false', 'AttendeeList'=>'', 'EventName' => 'Test schedule class 1', 'DateTime' => '05/24/2011 01:00:00 pm', 'TimeZone' => 28, 'Duration' => 60, 'Description' => ""}
|
29
|
+
|
30
|
+
response = @wiziq.schedule_new_event(args, attendee_list)
|
31
|
+
#
|
32
|
+
# {:session_code=>"1186330", :presenter_url=>"http://authorlive.com/aliveext/LoginToSession.aspx?SessionCode=rBgxEAPyprF0sfp8lKlymw%3d%3d", :recording_url=>"http://authorlive.com/aliveext/Recorded.aspx?SessionCode=8O7TD65TZAI%3d", :common_attendee_url=>"http://authorlive.com/aliveext/LoginToSession.aspx?SessionCode=zwWlYyiFnPL%2bqh2nIz%2b%2bxQ%3d%3d", :review_session_url=>"http://174.133.50.72/ReviewSessions/Review-Session.aspx?SessionCode=8O7TD65TZAI%3d", :attendee_urls=>nil}
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
# def test_update_event
|
37
|
+
#
|
38
|
+
# attendee_list = ["demoaccount"]
|
39
|
+
#
|
40
|
+
# args = { 'SessionCode' => '1170340', 'EventName' => 'Update Class 2', 'Description' => 'Update event'}
|
41
|
+
#
|
42
|
+
# if @wiziq.update_event(args)
|
43
|
+
# puts 'Pass'
|
44
|
+
# end
|
45
|
+
# end
|
46
|
+
|
47
|
+
#
|
48
|
+
# def test_delete_event
|
49
|
+
# begin
|
50
|
+
# response = @wiziq.delete_event(1186330)
|
51
|
+
# puts response
|
52
|
+
# rescue Wiziq::APIError => error
|
53
|
+
# puts "Error: " + error.inspect
|
54
|
+
# end
|
55
|
+
# end
|
56
|
+
|
57
|
+
# def test_add_attendee
|
58
|
+
# response = @wiziq.add_attendee(1186330, 'leehorrocks2')
|
59
|
+
# puts response
|
60
|
+
# end
|
61
|
+
#
|
62
|
+
# def test_remove_attendee
|
63
|
+
# response = @wiziq.remove_attendee(1170636, 'leehorrocks')
|
64
|
+
# puts response
|
65
|
+
# end
|
66
|
+
#
|
67
|
+
# def test_get_session_attendees
|
68
|
+
# response = @wiziq.get_attendees(1170636)
|
69
|
+
# puts response
|
70
|
+
# end
|
71
|
+
|
72
|
+
#
|
73
|
+
# def test_get_account_details
|
74
|
+
# response = @wiziq.get_account_details
|
75
|
+
# puts "----------------------"
|
76
|
+
# puts response
|
77
|
+
# end
|
78
|
+
|
79
|
+
# def test_get_my_package
|
80
|
+
# response = @wiziq.get_my_package
|
81
|
+
# puts response
|
82
|
+
# end
|
83
|
+
|
84
|
+
|
85
|
+
#
|
86
|
+
# def test_get_time_zones
|
87
|
+
# response = @wiziq.get_time_zones
|
88
|
+
#
|
89
|
+
# puts response.inspect
|
90
|
+
# response.each_key do |r|
|
91
|
+
# puts r.to_s + ": "+ response[r]
|
92
|
+
# end
|
93
|
+
# end
|
94
|
+
#
|
95
|
+
# def test_convert_date
|
96
|
+
# newdate = @wiziq.convert_date("23", "28", Time.now)
|
97
|
+
# puts newdate
|
98
|
+
# end
|
99
|
+
|
100
|
+
end
|
data/wiziq-ruby.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "wiziq/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "wiziq-ruby"
|
7
|
+
s.version = Wiziq::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Lee Horrocks"]
|
10
|
+
s.email = ["lee@leehorrocks.com"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{wiziq is a Ruby wrapper for the WiZiQ API}
|
13
|
+
s.description = %q{wiziq is a Ruby gem that provides a wrapper for interacting with the WiZiQ conferencing service API.}
|
14
|
+
|
15
|
+
s.required_rubygems_version = ">= 1.6.0"
|
16
|
+
|
17
|
+
s.add_dependency("httpi", "0.9.1")
|
18
|
+
s.add_dependency("nokogiri", ">= 1.4.4")
|
19
|
+
s.add_dependency("savon", "0.9.1")
|
20
|
+
|
21
|
+
#s.add_dependency("logging", ">= 1.5.0")
|
22
|
+
#s.add_dependency("savon_model", ">= 0.4.1")
|
23
|
+
|
24
|
+
s.add_development_dependency("bundler", "~> 1.0.0")
|
25
|
+
s.add_development_dependency("jeweler", "~> 1.6.0")
|
26
|
+
s.add_development_dependency("rspec", ">= 2.5.0")
|
27
|
+
s.add_development_dependency("shoulda")
|
28
|
+
s.add_development_dependency("autotest-standalone", ">= 4.4.2")
|
29
|
+
s.add_development_dependency("autotest-growl", ">= 0.2.9")
|
30
|
+
#s.add_development_dependency("savon_spec", ">= 0.1.6")
|
31
|
+
|
32
|
+
s.files = `git ls-files`.split("\n")
|
33
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
34
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
35
|
+
s.require_paths = ["lib"]
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wiziq-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Lee Horrocks
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-05-21 00:00:00 -04:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: httpi
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - "="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.9.1
|
25
|
+
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nokogiri
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 1.4.4
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: savon
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - "="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.9.1
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id003
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bundler
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ~>
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.0.0
|
58
|
+
type: :development
|
59
|
+
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: jeweler
|
62
|
+
prerelease: false
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.0
|
69
|
+
type: :development
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rspec
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 2.5.0
|
80
|
+
type: :development
|
81
|
+
version_requirements: *id006
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: shoulda
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: "0"
|
91
|
+
type: :development
|
92
|
+
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: autotest-standalone
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 4.4.2
|
102
|
+
type: :development
|
103
|
+
version_requirements: *id008
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: autotest-growl
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 0.2.9
|
113
|
+
type: :development
|
114
|
+
version_requirements: *id009
|
115
|
+
description: wiziq is a Ruby gem that provides a wrapper for interacting with the WiZiQ conferencing service API.
|
116
|
+
email:
|
117
|
+
- lee@leehorrocks.com
|
118
|
+
executables: []
|
119
|
+
|
120
|
+
extensions: []
|
121
|
+
|
122
|
+
extra_rdoc_files: []
|
123
|
+
|
124
|
+
files:
|
125
|
+
- .gitignore
|
126
|
+
- .rvmrc
|
127
|
+
- Gemfile
|
128
|
+
- LICENSE.txt
|
129
|
+
- README.rdoc
|
130
|
+
- Rakefile
|
131
|
+
- lib/wiziq.rb
|
132
|
+
- lib/wiziq/version.rb
|
133
|
+
- spec/spec_helper.rb
|
134
|
+
- spec/wiziq_spec.rb
|
135
|
+
- test/helper.rb
|
136
|
+
- test/test_wiziq.rb
|
137
|
+
- wiziq-ruby.gemspec
|
138
|
+
has_rdoc: true
|
139
|
+
homepage: ""
|
140
|
+
licenses: []
|
141
|
+
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
|
145
|
+
require_paths:
|
146
|
+
- lib
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: "0"
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 1.6.0
|
159
|
+
requirements: []
|
160
|
+
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 1.6.2
|
163
|
+
signing_key:
|
164
|
+
specification_version: 3
|
165
|
+
summary: wiziq is a Ruby wrapper for the WiZiQ API
|
166
|
+
test_files:
|
167
|
+
- spec/spec_helper.rb
|
168
|
+
- spec/wiziq_spec.rb
|
169
|
+
- test/helper.rb
|
170
|
+
- test/test_wiziq.rb
|