granicus-platform-api 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- granicus-platform-api (0.1.4)
4
+ granicus-platform-api (0.1.5)
5
5
  hashie (~> 1.0.0)
6
6
  savon (~> 0.9.2)
7
7
 
@@ -115,7 +115,7 @@ module GranicusPlatformAPI
115
115
  logout if @connected
116
116
 
117
117
  # create the client
118
- site = granicus_site
118
+ self.site = granicus_site
119
119
 
120
120
  # call login
121
121
  login username, password
@@ -209,6 +209,11 @@ module GranicusPlatformAPI
209
209
  call_soap_method(:get_event,'//ns5:GetEventResponse/event',{ 'EventID' => event_id })
210
210
  end
211
211
 
212
+ # return the requested event by uid
213
+ def get_event_by_uid(event_uid)
214
+ call_soap_method(:get_event_by_uid,'//ns5:GetEventByUIDResponse/event',{ 'EventUID' => event_uid })
215
+ end
216
+
212
217
  # update an event
213
218
  def update_event(event)
214
219
  call_soap_method(:update_event,'//ns4:UpdateEventResponse',{ 'event' => event })
@@ -241,7 +246,7 @@ module GranicusPlatformAPI
241
246
 
242
247
  # update metadata
243
248
  def update_meta_data(meta_data)
244
- call_soap_method(:update_meta_data,'//ns4:UpdateMetaDataResponse', { 'MetaData' => meta_data },true)
249
+ call_soap_method(:update_meta_data,'//ns4:UpdateMetaDataResponse', { 'MetaData' => meta_data })
245
250
  end
246
251
 
247
252
  # return all of the folders
@@ -281,7 +286,8 @@ module GranicusPlatformAPI
281
286
 
282
287
  #private
283
288
 
284
- def call_soap_method(method,returnfilter,args={},debug=false)
289
+ def call_soap_method(method,returnfilter,args={})
290
+ debug = @options[:debug]
285
291
  @response = @client.request :wsdl, method do
286
292
  soap.namespaces['xmlns:granicus'] = "http://granicus.com/xsd"
287
293
  soap.namespaces['xmlns:SOAP-ENC'] = "http://schemas.xmlsoap.org/soap/encoding/"
@@ -1,3 +1,3 @@
1
1
  module GranicusPlatformAPI
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -9,8 +9,8 @@ EVENT_ID = 30
9
9
  UPDATE_EVENT_ID = 35
10
10
  EVENT_META_ID = 1775
11
11
  CLIP_ID = 246
12
- CLIP_UID = '00000000-0000-0000-0000-000000000000'
13
- EVENT_UID = '00000000-0000-0000-0000-000000000000'
12
+ CLIP_UID = 'fe2a4b4b-0a69-1029-bc86-1bdd06848612'
13
+ EVENT_UID = '5fa327b8-906b-102b-b291-2f582cd39e9e'
14
14
  CLIP_META_ID = 574
15
15
  CLIP_FOREIGN_ID = 1
16
16
  EVENT_FOREIGN_ID = 1
@@ -29,6 +29,12 @@ describe GranicusPlatformAPI, "::Client.new" do
29
29
  client2.impersonate client.impersonation_token
30
30
  client2.get_current_user_logon.should == client.get_current_user_logon
31
31
  end
32
+ it "should support initialize without arguments" do
33
+ client2 = GranicusPlatformAPI::Client.new
34
+ client2.connect(GRANICUS_SITE,GRANICUS_LOGIN,GRANICUS_PASSWORD)
35
+ client2.get_current_user_logon
36
+ client2.logout
37
+ end
32
38
  end
33
39
 
34
40
  describe GranicusPlatformAPI, "::Client Camera Methods" do
@@ -129,7 +135,7 @@ describe GranicusPlatformAPI, "::Client Clip Methods" do
129
135
  end
130
136
  it "should get the requested clip by UID" do
131
137
  clip = client.get_clip_by_uid CLIP_UID
132
- clip.ID.should == CLIP_UID
138
+ clip.UID.should == CLIP_UID
133
139
  end
134
140
  end
135
141
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: granicus-platform-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
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: 2011-06-29 00:00:00.000000000Z
12
+ date: 2011-07-01 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &2156236720 !ruby/object:Gem::Requirement
16
+ requirement: &2160826480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.6'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2156236720
24
+ version_requirements: *2160826480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov
27
- requirement: &2156236220 !ruby/object:Gem::Requirement
27
+ requirement: &2160825980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.4.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2156236220
35
+ version_requirements: *2160825980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: hashie
38
- requirement: &2156235760 !ruby/object:Gem::Requirement
38
+ requirement: &2160825520 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2156235760
46
+ version_requirements: *2160825520
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: savon
49
- requirement: &2156235300 !ruby/object:Gem::Requirement
49
+ requirement: &2160825060 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.9.2
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2156235300
57
+ version_requirements: *2160825060
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: savon
60
- requirement: &2156234840 !ruby/object:Gem::Requirement
60
+ requirement: &2160824600 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.9.2
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2156234840
68
+ version_requirements: *2160824600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: hashie
71
- requirement: &2156234380 !ruby/object:Gem::Requirement
71
+ requirement: &2160824140 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: 1.0.0
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2156234380
79
+ version_requirements: *2160824140
80
80
  description: Wrapper for the Granicus Open Platform API v1.x
81
81
  email: javier@granicus.com
82
82
  executables: []