echo-connector 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/echo-connector.rb +3 -3
- metadata +1 -1
data/lib/echo-connector.rb
CHANGED
@@ -13,7 +13,7 @@ class Echo360
|
|
13
13
|
:http_method => :get }
|
14
14
|
|
15
15
|
@access_token = OAuth::AccessToken.new consumer
|
16
|
-
@organisation =
|
16
|
+
@organisation = get_organizations[organisation][:id]
|
17
17
|
end
|
18
18
|
|
19
19
|
def get_users
|
@@ -40,7 +40,7 @@ class Echo360
|
|
40
40
|
{ id: id, first_name: first_name, last_name: last_name, user_id: user_id }
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
43
|
+
def create_user user_id, password, first_name, last_name, role, email
|
44
44
|
builder = Nokogiri::XML::Builder.new do |xml|
|
45
45
|
xml.person {
|
46
46
|
xml.send(:"first-name", first_name)
|
@@ -69,7 +69,7 @@ class Echo360
|
|
69
69
|
Nokogiri.XML @access_token.get("/ess/scheduleapi/v1/people").body
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
72
|
+
def get_organizations
|
73
73
|
response = @access_token.get "/ess/scheduleapi/v1/organizations"
|
74
74
|
org_xml = Nokogiri.XML response.body
|
75
75
|
|