adobe_connect_api 0.0.23.alpha → 0.0.24.alpha
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/lib/adobe_connect_api.rb
CHANGED
@@ -126,7 +126,7 @@ class AdobeConnectAPI
|
|
126
126
|
|
127
127
|
# create a new meeting in Adobe Connect
|
128
128
|
# e.g. "https://collab-test.switch.ch/api/xml?action=sco-update&type=meeting&name=API-Test&folder-id=12578070&date-begin=2012-06-15T17:00&date-end=2012-06-15T23:00&url-path=apitest"
|
129
|
-
def create_meeting_with_host(name, folder_id, url_path,
|
129
|
+
def create_meeting_with_host(name, folder_id, url_path, filter)
|
130
130
|
|
131
131
|
# TODO KG: get folder_id
|
132
132
|
if folder_id == nil
|
@@ -139,7 +139,7 @@ class AdobeConnectAPI
|
|
139
139
|
"type" => "meeting",
|
140
140
|
"name" => name,
|
141
141
|
"folder-id" => folder_id,
|
142
|
-
"
|
142
|
+
"url-path" => url_path)
|
143
143
|
|
144
144
|
puts "ACS: meeting created"
|
145
145
|
puts res.body
|
@@ -147,34 +147,36 @@ class AdobeConnectAPI
|
|
147
147
|
sco_id = data["sco"].first['sco-id']
|
148
148
|
|
149
149
|
#get principal id
|
150
|
-
principal_id = get_principal_id(
|
150
|
+
principal_id = get_principal_id(filter)
|
151
151
|
puts "ACS: add principal " + principal_id + " as host to new created meeting " + sco_id
|
152
152
|
|
153
|
-
#
|
154
|
-
|
155
|
-
|
153
|
+
# aktuellen Benutzer als Host hinzufügen
|
154
|
+
result = permissions_update(principal_id, sco_id, 'host')
|
155
|
+
puts result
|
156
|
+
return result
|
156
157
|
end
|
157
158
|
|
158
159
|
# searches the user with the given email address and returns the principal id
|
159
160
|
# e.g. "https://collab-test.switch.ch/api/xml?action=principal-list&filter-email=rfurter@ethz.ch"
|
160
161
|
def get_principal_id(filter)
|
161
|
-
res = query("principal-list", filter)
|
162
|
+
res = query("principal-list", "filter" => filter)
|
162
163
|
puts query
|
163
164
|
|
164
165
|
data = XmlSimple.xml_in(res.body)
|
165
|
-
|
166
|
-
if data["principal-list"]
|
167
|
-
data["principal-list"].each do |trans|
|
168
|
-
rows = trans["principal"]
|
169
|
-
end
|
170
|
-
end
|
171
|
-
result = AdobeConnectAPI::Result.new(data["status"][0]["code"], rows)
|
166
|
+
principal_id = data["principal"].first['principal-id']
|
172
167
|
|
173
|
-
|
168
|
+
return principal_id
|
169
|
+
end
|
174
170
|
|
175
|
-
|
176
|
-
|
177
|
-
|
171
|
+
# e.g. "https://collab-test.switch.ch/api/xml?action=permissions-update&principal-id=12578066&acl-id=13112626&permission-id=host"
|
172
|
+
def permissions_update(principal_id, acl_id, permission_id)
|
173
|
+
res = query("permissions-update",
|
174
|
+
"principal-id" => principal_id,
|
175
|
+
"acl-id" => acl_id,
|
176
|
+
"permission-id" => permission_id)
|
177
|
+
puts query
|
178
|
+
|
179
|
+
return res.body
|
178
180
|
end
|
179
181
|
|
180
182
|
#Returns all defined quotas (untested)
|
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.24.alpha
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-09-25 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xml-simple
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152420380 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152420380
|
25
25
|
description: Wrapper to the Adobe Connect API
|
26
26
|
email:
|
27
27
|
- christian.rohrer@switch.ch
|