manywho-sdk 1.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/manywho-sdk.rb +559 -0
  3. metadata +52 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7d403a0be840c7640b0566e0cb3dfdc11273459b
4
+ data.tar.gz: 3e4c8b0e0ac5972436f2aaaab5ca1c6083fd6564
5
+ SHA512:
6
+ metadata.gz: 343f401291045fbe254abdd5f7f71c15450cc8328d48647d5cd80e5fbd1a60f7bc292771676fa50ef239daef03f1e59d2476f1b97218e438811f1d92c48a0121
7
+ data.tar.gz: 5bdf83df3a4a7614910f0e08d1d904d07642f786a9377ed5cf566d3b194fb6a8e9852f0355a7160184a1a4cc45a54fd0f6300cffb4a0b9254e6468e22323dab3
@@ -0,0 +1,559 @@
1
+ =begin
2
+
3
+ Copyright 2013 Manywho, Inc.
4
+
5
+ Licensed under the Manywho License, Version 1.0 (the "License"); you may not use this
6
+ file except in compliance with the License.
7
+
8
+ You may obtain a copy of the License at: http://manywho.com/sharedsource
9
+
10
+ Unless required by applicable law or agreed to in writing, software distributed under
11
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
12
+ KIND, either express or implied. See the License for the specific language governing
13
+ permissions and limitations under the License.
14
+
15
+ =end
16
+
17
+ require "net/http"
18
+ require "net/https"
19
+ require "json"
20
+ require "date"
21
+ require "cgi"
22
+
23
+ HTTP = Net::HTTP.new("flow.manywho.com", 443)
24
+ HTTP.use_ssl = true
25
+
26
+ # OpenSSL verification
27
+ HTTP.verify_mode = OpenSSL::SSL::VERIFY_NONE
28
+
29
+ module ManyWho
30
+ class Engine
31
+ # Initialize instance variables
32
+ def initialize
33
+ reset()
34
+ end
35
+
36
+ def reset
37
+ @TenantUID = false
38
+ @LoginToken = false
39
+ end
40
+
41
+ # This method sets the Tenant Unique ID
42
+ def set_tenant(tenantUniqueID)
43
+ if ( is_valid_id(tenantUniqueID, "tenantUniqueId") )
44
+ @TenantUID = tenantUniqueID
45
+ end
46
+ end
47
+
48
+ # Tests if an id is valid, otherwise raises an error
49
+ def is_valid_id(idString, idType)
50
+ if (idString.is_a? String) && (idString =~ /^[-0-9a-f]+$/) &&
51
+ (idString.length == 36) && (idString.count("-") == 4)
52
+ return true
53
+ else
54
+ puts "Error: id is not valid (" + idType + "): " + idString.to_s
55
+ return false
56
+ end
57
+ end
58
+
59
+ # Tests if a request has completed successfully, otherwise raises an error
60
+ def is_ok(resp, url)
61
+ if (resp.code == "200") && (resp.body.length)
62
+ return true
63
+ else
64
+ puts "Error: something went wrong in the rsponse (" + url +")"
65
+ return false
66
+ end
67
+ end
68
+
69
+ # Tests if a value is of a specified class type, otherwise raises an error
70
+ def is_class(value, expectedClass, methodName, parameter)
71
+ if (value.class.to_s == expectedClass.to_s)
72
+ return true
73
+ else
74
+ puts "Error: parameter " + parameter.to_s + " of " + methodName + " must be a " + expectedClass.to_s + ". " +
75
+ "Parameter " + parameter.to_s + " was a " + value.class.to_s
76
+ return false
77
+ end
78
+ end
79
+
80
+ # Gets a FlowResponse object from the server for the provided ID
81
+ def get_FlowResponse(flowId)
82
+ if ( is_valid_id(flowId, "FlowId") )
83
+ resp, data = HTTP.get("/api/run/1/flow/" + flowId,
84
+ { "ManyWhoTenant" => @TenantUID , "content-type" => "application/json"} )
85
+ # If everything went well, return a new FlowResponse from the JSON object retrieved
86
+ if ( is_ok(resp, "/api/run/1/flow/" + flowId) )
87
+ parsedJSON = JSON.parse(resp.body)
88
+ return FlowResponse.new(parsedJSON)
89
+ end
90
+ end
91
+ return false
92
+ end
93
+
94
+ # Creates an EngineInitializationRequest to be sent to the server using get_EngineInitializationResponse
95
+ def create_EngineInitializationRequest(flowResponse, annotations = nil, inputs = [], mode = nil)
96
+ # Ensure that all of the arguments are valid
97
+ if ( is_class(flowResponse, FlowResponse, "create_EngineInitializationRequest", 1) ) &&
98
+ ( (annotations == nil) or (is_class( annotations, Hash, "create_EngineInitializationRequest", "annotations")) ) &&
99
+ ( (is_class( inputs, Array, "create_EngineInitializationRequest", "inputs")) ) &&
100
+ ( (mode == nil) or (is_class( mode, String, "create_EngineInitializationRequest", "mode")) )
101
+ # Create a hash to initialize the EngineInitializationRequest
102
+ engineInitializationJSON = { "flowId" => flowResponse.id,
103
+ "annotations" => annotations,
104
+ "inputs" => inputs,
105
+ "playerURL" => "https://flow.manywho.com/"+@TenantUID+"/play/myplayer",
106
+ "joinPlayerURL" => "https://flow.manywho.com/"+@TenantUID+"/play/myplayer",
107
+ "mode" => mode
108
+ }
109
+ return EngineInitializationRequest.new(engineInitializationJSON)
110
+ end
111
+ return false
112
+ end
113
+
114
+ # Gets an EngineInitializationResponse from the server, using a HTTP POST request.
115
+ def get_EngineInitializationResponse(engineInitializationRequest)
116
+ # Ensure that all of the arguments are valid
117
+ if ( is_class(engineInitializationRequest, EngineInitializationRequest, "get_EngineInitializationResponse", 1) )
118
+
119
+ # POST the EngineInitializationRequest
120
+ resp, data = HTTP.post("/api/run/1/",
121
+ engineInitializationRequest.to_json(),
122
+ { "ManyWhoTenant" => @TenantUID , "content-type" => "application/json"} )
123
+
124
+ # If everything went well, return a new EngineInitializationResponse created from the server's response
125
+ if ( is_ok(resp, "/api/run/1/") )
126
+ parsedJSON = JSON.parse(resp.body)
127
+ return EngineInitializationResponse.new(parsedJSON)
128
+ end
129
+ end
130
+ return false
131
+ end
132
+
133
+ # Logs in to the flow. Flows may require you to log in, this only has to be done once before executing the flow
134
+ def login(engineInitializationResponse, username, password)
135
+ # Ensure that all of the arguments are valid
136
+ if ( is_class(engineInitializationResponse, EngineInitializationResponse, "login", 1) ) &&
137
+ ( ( is_class(username, String, "login", 2) ) && (username.length) ) &&
138
+ ( ( is_class(password, String, "login", 3) ) && (password.length) )
139
+
140
+ # Create a logon request
141
+ loginRequest = {
142
+ "loginUrl" => engineInitializationResponse.authorizationContext.loginUrl, #engineInitializationResponse.authorizationContext["loginUrl"],
143
+ "username" => username,
144
+ "password" => password
145
+ }
146
+
147
+ # POST the login request
148
+ resp, data = HTTP.post("/api/run/1/authentication",
149
+ loginRequest.to_json(),
150
+ { "ManyWhoTenant" => @TenantUID , "content-type" => "application/json"} )
151
+
152
+ # If everything went well, set the logon token
153
+ if ( is_ok(resp, "/api/run/1/authentication") )
154
+ @LoginToken = resp.body[1...resp.body.length-1]
155
+ end
156
+ end
157
+ return false
158
+ end
159
+
160
+ # Create an EngineInvokeRequest to be posted to the server using get_EngineInvokeResponse
161
+ def create_EngineInvokeRequest(engineInitializationResponse, flowResponse=nil, invokeType="FORWARD")
162
+ # Ensure that all of the arguments are valid
163
+ if ( is_class(engineInitializationResponse, EngineInitializationResponse, "create_EngineInvokeRequest", 1) ) &&
164
+ ( is_class(invokeType, String, "create_EngineInvokeRequest", "invokeType") ) &&
165
+ ( (flowResponse == nil) || (is_class(flowResponse, FlowResponse, "create_EngineInvokeRequest", "flowResponse")) )
166
+
167
+ # If a flowResponse is provided, use the startMapElementId
168
+ # If no flowResponse is provided, such as the engine is syncing, use the currentMapElementId
169
+ if (flowResponse)
170
+ currentMapElementId = flowResponse.startMapElementId
171
+ elsif
172
+ currentMapElementId = engineInitializationResponse.currentMapElementId
173
+ end
174
+
175
+ # Create and return a new EngineInvokeRequest
176
+ engineInvokeJSON = {
177
+ "stateId" => engineInitializationResponse.stateId,
178
+ "stateToken" => engineInitializationResponse.stateToken,
179
+ "currentMapElementId" => currentMapElementId, #"7b2e4865-bd54-4073-b4f4-a4ec001afc9a", #### BODGE #### engineInitializationResponse.currentMapElementId,
180
+ "invokeType" => invokeType,
181
+ "geoLocation" => {
182
+ "latitude" => 0,
183
+ "longitude" => 0,
184
+ "accuracy" => 0,
185
+ "altitude" => 0,
186
+ "altitudeAccuracy" => 0,
187
+ "heading" => 0,
188
+ "speed" => 0
189
+ },
190
+ "mapElementInvokeRequest" => {
191
+ "selectedOutcomeId" => nil
192
+ },
193
+ "mode" => nil
194
+ }
195
+ return EngineInvokeRequest.new(engineInvokeJSON)
196
+ end
197
+ return false
198
+ end
199
+
200
+ # Create a EngineInvokeRequest from an engineInvokeResponse - such as when an outcome is selected, and a new EngineInvokeRequest is required
201
+ def recreate_EngineInvokeRequest(engineInvokeResponse, selectedOutcomeId, invokeType="FORWARD")
202
+ # Ensure that all of the arguments are valid
203
+ if ( is_class(engineInvokeResponse, EngineInvokeResponse, "recreate_EngineInvokeRequest", 1) ) &&
204
+ ( is_valid_id(selectedOutcomeId, "selectedOutcomeId") ) &&
205
+ ( is_class(invokeType, String, "create_EngineInvokeRequest", "invokeType") )
206
+
207
+ # Create and return a new EngineInvokeRequest
208
+ engineInvokeJSON = {
209
+ "stateId" => engineInvokeResponse.stateId,
210
+ "stateToken" => engineInvokeResponse.stateToken,
211
+ "currentMapElementId" => engineInvokeResponse.currentMapElementId,
212
+ "invokeType" => invokeType,
213
+ "geoLocation" => {
214
+ "latitude" => 0,
215
+ "longitude" => 0,
216
+ "accuracy" => 0,
217
+ "altitude" => 0,
218
+ "altitudeAccuracy" => 0,
219
+ "heading" => 0,
220
+ "speed" => 0
221
+ },
222
+ "mapElementInvokeRequest" => {
223
+ "selectedOutcomeId" => selectedOutcomeId
224
+ },
225
+ "mode" => nil
226
+ }
227
+ return EngineInvokeRequest.new(engineInvokeJSON)
228
+ end
229
+ return false
230
+ end
231
+
232
+ # Post the EngineInvokeRequest, and return the EngineInvokeResponse
233
+ def get_EngineInvokeResponse(engineInvokeRequest)
234
+ # Ensure that all arguments are valid
235
+ if ( is_class(engineInvokeRequest, EngineInvokeRequest, "get_EngineInvokeResponse", 1) )
236
+ if (@LoginToken)
237
+ # POST the EngineInvokeRequest, with authentication
238
+ resp, data = HTTP.post("/api/run/1/state/" + engineInvokeRequest.stateId,
239
+ engineInvokeRequest.to_json,
240
+ { "ManyWhoTenant" => @TenantUID , "content-type" => "application/json", "Authorization" => @LoginToken} )
241
+ else
242
+ # POST the EngineInvokeRequest, without authentication
243
+ resp, data = HTTP.post("/api/run/1/state/" + engineInvokeRequest.stateId,
244
+ engineInvokeRequest.to_json,
245
+ { "ManyWhoTenant" => @TenantUID , "content-type" => "application/json"} )
246
+ end
247
+
248
+ # If everything went well, return a new EngineInvokeResponse created from the server's response
249
+ if ( is_ok(resp, "/api/run/1/state/" + engineInvokeRequest.stateId) )
250
+ parsedJSON = JSON.parse(resp.body)
251
+ return EngineInvokeResponse.new(parsedJSON)
252
+ end
253
+ end
254
+ return false
255
+ end
256
+
257
+ # Select an outcomeResponse, and get the next EngineInvokeResponse
258
+ def select_OutcomeResponse(engineInvokeResponse, outcomeResponseDeveloperName, invokeType="FORWARD")
259
+ # Ensure that all arguments are valid
260
+ if ( is_class(engineInvokeResponse, EngineInvokeResponse, "select_OutcomeResponse", 1) ) &&
261
+ ( is_class(outcomeResponseDeveloperName, String, "select_OutcomeResponse", 2) ) &&
262
+ ( is_class(invokeType, String, "select_OutcomeResponse", "invokeType") )
263
+
264
+ # Get the ID of the selected outcome, using the outcome's developerName
265
+ selectedOutcomeId = nil
266
+ engineInvokeResponse.mapElementInvokeResponses[0].outcomeResponses.each do |outcomeResp|
267
+ if (outcomeResp.developerName == outcomeResponseDeveloperName)
268
+ selectedOutcomeId = outcomeResp.id
269
+ end
270
+ end
271
+
272
+ # Create the EngineInvokeRequest from the EngineInvokeResponse
273
+ engineInvokeRequest = recreate_EngineInvokeRequest(engineInvokeResponse, selectedOutcomeId)
274
+
275
+ # Return a new EngineInvokeResponse, created from data received from the server
276
+ return get_EngineInvokeResponse( engineInvokeRequest )
277
+ end
278
+ return false
279
+ end
280
+
281
+ # Load a flow, given the tenantId, flowId and logon details the first EngineInvokeResponse will be returned
282
+ def load_flow(tenant, flowId, username="", password="")
283
+ # Ensure all the arguments are valid
284
+ if ( is_valid_id(tenant, "tenantId") ) &&
285
+ ( is_valid_id(flowId, "flowId") ) &&
286
+ ( is_class(username, String, "load_flow", "username") ) &&
287
+ ( is_class(password, String, "load_flow", "password") )
288
+ # Set the tenant
289
+ set_tenant(tenant)
290
+
291
+ # Get the FlowResponse for the flow by id
292
+ flowResponse = get_FlowResponse(flowId)
293
+
294
+ # Create an EngineInitializationRequest, and use it to retreive an EngineInitializationResponse from the server
295
+ engineInitializationResponse = get_EngineInitializationResponse(
296
+ create_EngineInitializationRequest( flowResponse )
297
+ )
298
+
299
+ # If required to log in to the flow
300
+ if (engineInitializationResponse.statusCode == "401")
301
+ # If login details, attempt to login
302
+ if (username != "") && (password != "")
303
+ login(engineInitializationResponse, username, password)
304
+ else
305
+ return "You need to login to run this flow: " + engineInitializationResponse.authorizationContext.loginUrl#["loginUrl"]
306
+ end
307
+ end
308
+
309
+ # Get a new EngineInvokeResponse from the server
310
+ return engineInvokeResponse = get_EngineInvokeResponse(
311
+ create_EngineInvokeRequest(engineInitializationResponse, flowResponse=flowResponse) )
312
+ end
313
+ return false
314
+ end
315
+ end
316
+
317
+ # Initialized with a JSON hash, each value of the hash is converted into an instance variable. Can also be easily converted into a JSON string
318
+ class MyStruct
319
+ def to_json(options= {})
320
+ hash = {}
321
+ self.instance_variables.each do |var|
322
+ hash[var[1...var.length]] = self.instance_variable_get var
323
+ end
324
+ return hash.to_json
325
+ end
326
+
327
+ # Set instance values from the hash
328
+ def initialize(jsonValue)
329
+ if (jsonValue != nil)
330
+ jsonValue.each do
331
+ |k,v| self.instance_variable_set("@#{k}", v)
332
+ end
333
+ end
334
+ end
335
+ end
336
+
337
+ class FlowResponse < MyStruct
338
+ attr_accessor :dateCreated, :dateModified, :userCreated,
339
+ :userModified, :userOwner, :alertEmail,
340
+ :editingToken, :id, :developerName,
341
+ :developerSummary, :isActive, :startMapElementId,
342
+ :authorization
343
+
344
+ def initialize(jsonValue)
345
+ super(jsonValue)
346
+ @id = FlowIdentifier.new(@id)
347
+ end
348
+ end
349
+
350
+ class EngineInitializationRequest < MyStruct
351
+ attr_accessor :flowId, :annotations, :inputs,
352
+ :mode
353
+
354
+ def initialize(jsonValue)
355
+ super(jsonValue)
356
+ #@flowId = FlowIdentifier.new(@flowId)
357
+ if (@inputs != nil)
358
+ endArray = []
359
+ @inputs.each do |input|
360
+ endArray += [EngineValue(input)]
361
+ end
362
+ @inputs = endArray
363
+ end
364
+
365
+ end
366
+ end
367
+
368
+ class EngineInitializationResponse < MyStruct
369
+ attr_accessor :stateId, :stateToken, :currentMapElementId,
370
+ :currentMapElementId, :currentStreamId, :statusCode,
371
+ :authorizationContext
372
+ def initialize(jsonValue)
373
+ super(jsonValue)
374
+ @authorizationContext = AuthorizationContext.new(@authorizationContext)
375
+ end
376
+ end
377
+
378
+ class EngineInvokeRequest < MyStruct
379
+ attr_accessor :stateId, :stateToken, :currentMapElementId,
380
+ :invokeType, :annotations, :geoLocatoin,
381
+ :mapElementInvokeRequest, :mode
382
+ def initialize(jsonValue)
383
+ super(jsonValue)
384
+ @geoLocation = GeoLocation.new(@geoLocation)
385
+ @mapElementInvokeRequest = MapElementInvokeResponse.new(@mapElementInvokeRequest)
386
+ end
387
+ end
388
+
389
+ class MapElementInvokeRequest < MyStruct
390
+ attr_accessor :selectedOutcomeId
391
+ end
392
+
393
+ class EngineInvokeResponse < MyStruct
394
+ attr_accessor :stateId, :stateToken, :currentMapElementId,
395
+ :invokeType, :annotations, :mapElementInvokeResponses,
396
+ :stateLog, :preCommitStateValues, :stateValues,
397
+ :outputs, :statusCode, :runFlowUrl,
398
+ :joinFlowUrl, :authorizationContext
399
+ def initialize(jsonValue)
400
+ super(jsonValue)
401
+ if (@mapElementInvokeResponses != nil)
402
+ endArray = []
403
+ @mapElementInvokeResponses.each do |invokeResponse|
404
+ endArray += [MapElementInvokeResponse.new(invokeResponse)]
405
+ end
406
+ @mapElementInvokeResponses = endArray
407
+ end
408
+ if (@preCommitStateValues != nil)
409
+ endArray = []
410
+ @preCommitStateValues.each do |preComitStateValue|
411
+ endArray += [EngineValue.new(preComitStateValue)]
412
+ end
413
+ @preCommitStateValues = endArray
414
+ end
415
+ if (@stateValues != nil)
416
+ endArray = []
417
+ @stateValues.each do |stateValue|
418
+ endArray += [EngineValue.new(stateValue)]
419
+ end
420
+ @stateValues = endArray
421
+ end
422
+ if (@outputs != nil)
423
+ endArray = []
424
+ @outputs.each do |output|
425
+ endArray += [EngineValue.new(output)]
426
+ end
427
+ @outputs = endArray
428
+ end
429
+ @authorizationContext = AuthorizationContext.new(@authorizationContext)
430
+ end
431
+ end
432
+
433
+ class MapElementInvokeResponse < MyStruct
434
+ attr_accessor :mapElementId, :developerName, :pageResponse,
435
+ :outcomeResponses, :rootFaults
436
+
437
+ def initialize(jsonValue)
438
+ super(jsonValue)
439
+ @pageResponse = PageResponse.new(@pageResponse)
440
+ if (@outcomeResponses != nil)
441
+ endArray = []
442
+ @outcomeResponses.each do |outputResponse|
443
+ endArray += [OutcomeResponse.new(outputResponse)]
444
+ end
445
+ @outcomeResponses = endArray
446
+ end
447
+ end
448
+ end
449
+
450
+ class PageResponse < MyStruct
451
+ attr_accessor :label, :pageContainerResponses, :pageComponentResponses,
452
+ :pageContainerDataResponses, :pageComponentDataResponses, :order,
453
+ :outcomeResponses, :rootFaults
454
+ def initialize(jsonValue)
455
+ super(jsonValue)
456
+ if (@pageContainerResponses != nil)
457
+ endArray = []
458
+ @pageContainerResponses.each do |pContainer|
459
+ endArray += [PageContainerResponse.new(pContainer)]
460
+ end
461
+ @pageContainerResponses = endArray
462
+ end
463
+ if (@pageComponentResponses != nil)
464
+ endArray = []
465
+ @pageComponentResponses.each do |pComponent|
466
+ endArray += [PageComponentResponse.new(pComponent)]
467
+ end
468
+ @pageComponentResponses = endArray
469
+ end
470
+ if (@pageContainerDataResponses != nil)
471
+ endArray = []
472
+ @pageContainerDataResponses.each do |pContainerData|
473
+ endArray += [PageContainerDataResponse.new(pContainerData)]
474
+ end
475
+ @pageContainerDataResponses = endArray
476
+ end
477
+ if (@pageComponentDataResponses != nil)
478
+ endArray = []
479
+ @pageComponentDataResponses.each do |pComponentData|
480
+ endArray += [PageComponentDataResponse.new(pComponentData)]
481
+ end
482
+ @pageComponentDataResponses = endArray
483
+ end
484
+ if (@outcomeResponses != nil)
485
+ endArray = []
486
+ @outcomeResponses.each do |outcomeResponse|
487
+ endArray += [OutcomeResponse.new(outcomeResponse)]
488
+ end
489
+ @outcomeResponses = endArray
490
+ end
491
+ end
492
+ end
493
+
494
+ class PageContainerResponse < MyStruct
495
+ attr_accessor :id, :containerType, :developerName,
496
+ :label, :pageContainerResponses, :order
497
+ def initialize(jsonValue)
498
+ super(jsonValue)
499
+ if (@pageContainerResponses != nil)
500
+ endArray = []
501
+ @pageContainerResponses.each do |pContainer|
502
+ endArray += [PageContainerResponse.new(pContainer)]
503
+ end
504
+ @pageContainerResponses = endArray
505
+ end
506
+ end
507
+ end
508
+
509
+ class PageComponentResponse < MyStruct
510
+ attr_accessor :pageContainerDeveloperName, :pageContainerId, :id,
511
+ :developerName, :componentType, :contentType,
512
+ :label, :columns, :size,
513
+ :maxSize, :height, :width,
514
+ :hintValue, :helpInfo, :order,
515
+ :isMultiSelect, :hasEvents
516
+ end
517
+
518
+ class PageComponentDataResponse < MyStruct
519
+ attr_accessor :pageComponentId, :isEnabled, :isEditable,
520
+ :isRequired, :isVisible, :objectData,
521
+ :objectDataRequest, :contentValue, :content,
522
+ :isValid, :validationMessage, :tags
523
+ end
524
+
525
+ class PageContainerDataResponse < MyStruct
526
+ attr_accessor :pageContainerId, :isEnabled, :isVisible,
527
+ :tags
528
+ end
529
+
530
+ class OutcomeResponse < MyStruct
531
+ attr_accessor :id, :developerName, :label,
532
+ :pageActionBinding, :formElementBindingId, :order
533
+ end
534
+
535
+ class GeoLocation < MyStruct
536
+ attr_accessor :latitude, :longitude, :accuracy,
537
+ :altitude, :altitudeAccuracy, :heading,
538
+ :speed
539
+ end
540
+
541
+ class FlowIdentifier < MyStruct
542
+ attr_accessor :id, :versionId
543
+ end
544
+
545
+ class AuthorizationContext < MyStruct
546
+ attr_accessor :id, :directoryId, :loginUrl
547
+ end
548
+
549
+ class AuthorizationRequest < MyStruct
550
+ attr_accessor :loginUrl, :username, :password,
551
+ :token
552
+ end
553
+
554
+ class EngineValue < MyStruct
555
+ attr_accessor :id, :typeElementId, :typeElementEntryId,
556
+ :typeElementDeveloperName, :typeElementEntryDeveloperName, :contentValue,
557
+ :contentType, :id
558
+ end
559
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: manywho-sdk
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Eddie Ellams
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2013-09-03 00:00:00 Z
13
+ dependencies: []
14
+
15
+ description: Allows ManyWho Flows to be run within Ruby
16
+ email: eddie.ellams@manywho.com
17
+ executables: []
18
+
19
+ extensions: []
20
+
21
+ extra_rdoc_files: []
22
+
23
+ files:
24
+ - lib/manywho-sdk.rb
25
+ homepage: https://github.com/manywho/manywho_flow_sdk_ruby
26
+ licenses:
27
+ - Manywho License, Version 1.0
28
+ metadata: {}
29
+
30
+ post_install_message:
31
+ rdoc_options: []
32
+
33
+ require_paths:
34
+ - lib
35
+ required_ruby_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - &id001
38
+ - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: "0"
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - *id001
44
+ requirements: []
45
+
46
+ rubyforge_project:
47
+ rubygems_version: 2.0.7
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: ManyWho SDK Gem
51
+ test_files: []
52
+