adobe_connect_api 0.0.67.alpha → 0.0.68.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Rakefile +3 -0
- data/adobe_connect_api.gemspec +1 -0
- data/config/config.breeze.yml +28 -0
- data/lib/adobe_connect_api/version.rb +1 -1
- data/lib/adobe_connect_api.rb +36 -0
- data/spec/adobe_connect_api_spec.rb +25 -0
- data/spec/spec_helper.rb +7 -0
- metadata +21 -5
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/adobe_connect_api.gemspec
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright (c) 2010 SWITCH - Serving Swiss Universities
|
2
|
+
# Author: Christian Rohrer <christian.rohrer@switch.ch>
|
3
|
+
# $Id$
|
4
|
+
|
5
|
+
# Configuration of the breeze / adobe connect connection
|
6
|
+
|
7
|
+
development:
|
8
|
+
url : https://collab-test.switch.ch
|
9
|
+
username: interactAdmin@switch.ch
|
10
|
+
password: CqxV4pi0WUyqAq5G
|
11
|
+
|
12
|
+
generic_user_password: gu4nolico
|
13
|
+
|
14
|
+
test:
|
15
|
+
url : https://collab-test.switch.ch
|
16
|
+
username: interactAdmin@switch.ch
|
17
|
+
password: CqxV4pi0WUyqAq5G
|
18
|
+
|
19
|
+
generic_user_password: gu4nolico
|
20
|
+
|
21
|
+
production:
|
22
|
+
url : https://collab.switch.ch
|
23
|
+
username: interactAdmin@switch.ch
|
24
|
+
password: CqxV4pi0WUyqAq5G
|
25
|
+
|
26
|
+
generic_user_password: gu4nolico
|
27
|
+
|
28
|
+
|
data/lib/adobe_connect_api.rb
CHANGED
@@ -366,6 +366,7 @@ class AdobeConnectAPI
|
|
366
366
|
return AdobeConnectAPI::Result.new(data["status"][0]["code"], rows)
|
367
367
|
end
|
368
368
|
|
369
|
+
# sco-search-by-field&query=TB_ac_test&field=name
|
369
370
|
def search_meeting(name)
|
370
371
|
res = query("sco-search-by-field",
|
371
372
|
"query" => name,
|
@@ -379,6 +380,31 @@ class AdobeConnectAPI
|
|
379
380
|
return AdobeConnectAPI::Result.new(data["status"][0]["code"], scos)
|
380
381
|
end
|
381
382
|
|
383
|
+
# sco-search-by-field&query=TB_ac_test&field=name and additionally check that the name is exactly the same (what is not done in Adobe Connect)
|
384
|
+
def search_unique_name(name)
|
385
|
+
res = query("sco-search-by-field",
|
386
|
+
"query" => name,
|
387
|
+
"field" => "name")
|
388
|
+
data = XmlSimple.xml_in(res.body)
|
389
|
+
scos = []
|
390
|
+
if data["sco-search-by-field-info"]
|
391
|
+
results = data["sco-search-by-field-info"][0]
|
392
|
+
scos = results["sco"]
|
393
|
+
end
|
394
|
+
result = AdobeConnectAPI::Result.new(data["status"][0]["code"], scos)
|
395
|
+
|
396
|
+
if result.rows.empty?
|
397
|
+
nil
|
398
|
+
else
|
399
|
+
result.rows.each do |sco|
|
400
|
+
if sco["name"].eql(name)
|
401
|
+
return sco["sco-id"]
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
405
|
+
return nil
|
406
|
+
end
|
407
|
+
|
382
408
|
def update_meeting(sco_id, description, language)
|
383
409
|
"action = sco-update&sco-id=&description=&lang="
|
384
410
|
res = query("sco-update",
|
@@ -431,4 +457,14 @@ class AdobeConnectAPI
|
|
431
457
|
return response
|
432
458
|
end
|
433
459
|
|
460
|
+
|
461
|
+
|
462
|
+
### ADMIN FUNCTIONS (FOR STATISTICS) ###
|
463
|
+
|
464
|
+
# def report-active-meetings
|
465
|
+
# res = query("report-active-meetings")
|
466
|
+
# data = XmlSimple.xml_in(res.body)
|
467
|
+
# return AdobeConnectAPI::Result.new(data)
|
468
|
+
# end
|
469
|
+
|
434
470
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe AdobeConnectAPI do
|
4
|
+
|
5
|
+
it 'should login admin' do
|
6
|
+
interactconfig = YAML::load_file("#{Rails.root}/config/config.breeze.yml")[Rails.env]
|
7
|
+
url = interactconfig["url"]
|
8
|
+
|
9
|
+
|
10
|
+
# open AdobeConnectAPI (use URL from config file)
|
11
|
+
puts settings.environment
|
12
|
+
puts settings.root
|
13
|
+
@acs = AdobeConnectAPI.new(nil, settings.environment.to_s, settings.root)
|
14
|
+
# login to Adobe Connect
|
15
|
+
res = XmlSimple.xml_in(@acs.login(), { 'KeyAttr' => 'name' })
|
16
|
+
status = res['status'].first['code']
|
17
|
+
puts status
|
18
|
+
|
19
|
+
@admin_sessionid = request.cookies["BREEZESESSION"]
|
20
|
+
puts @admin_sessionid
|
21
|
+
end
|
22
|
+
it 'should return correct version string' do
|
23
|
+
Sudoku.version_string.should == "Sudoku version #{Sudoku::VERSION}"
|
24
|
+
end
|
25
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adobe_connect_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.68.alpha
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-31 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xml-simple
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153472440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,18 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153472440
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &2153471940 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.11'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2153471940
|
25
36
|
description: Wrapper to the Adobe Connect API
|
26
37
|
email:
|
27
38
|
- christian.rohrer@switch.ch
|
@@ -36,11 +47,14 @@ files:
|
|
36
47
|
- README.md
|
37
48
|
- Rakefile
|
38
49
|
- adobe_connect_api.gemspec
|
50
|
+
- config/config.breeze.yml
|
39
51
|
- lib/adobe_connect_api.rb
|
40
52
|
- lib/adobe_connect_api/filter_definition.rb
|
41
53
|
- lib/adobe_connect_api/result.rb
|
42
54
|
- lib/adobe_connect_api/sort_definition.rb
|
43
55
|
- lib/adobe_connect_api/version.rb
|
56
|
+
- spec/adobe_connect_api_spec.rb
|
57
|
+
- spec/spec_helper.rb
|
44
58
|
homepage: ''
|
45
59
|
licenses: []
|
46
60
|
post_install_message:
|
@@ -65,4 +79,6 @@ rubygems_version: 1.8.17
|
|
65
79
|
signing_key:
|
66
80
|
specification_version: 3
|
67
81
|
summary: Wrapper to the Adobe Connect API written in Ruby
|
68
|
-
test_files:
|
82
|
+
test_files:
|
83
|
+
- spec/adobe_connect_api_spec.rb
|
84
|
+
- spec/spec_helper.rb
|