Class: RusticiSoftwareCloudV2::XapiApi

Inherits:
Object
  • Object
show all
Defined in:
lib/rustici_software_cloud_v2/api/xapi_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ XapiApi

Returns a new instance of XapiApi.



19
20
21
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_statement_pipe(xapi_statement_pipe, opts = {}) ⇒ StringResultSchema

Create an xAPI statement pipe. Create an xAPI statement pipe.

Parameters:

  • xapi_statement_pipe
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 27

def create_statement_pipe(xapi_statement_pipe, opts = {})
  data, _status_code, _headers = create_statement_pipe_with_http_info(xapi_statement_pipe, opts)
  data
end

#create_statement_pipe_with_http_info(xapi_statement_pipe, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Create an xAPI statement pipe. Create an xAPI statement pipe.

Parameters:

  • xapi_statement_pipe
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 37

def create_statement_pipe_with_http_info(xapi_statement_pipe, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.create_statement_pipe ...'
  end
  # verify the required parameter 'xapi_statement_pipe' is set
  if @api_client.config.client_side_validation && xapi_statement_pipe.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_statement_pipe' when calling XapiApi.create_statement_pipe"
  end
  # resource path
  local_var_path = '/xapi/statementPipes'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(xapi_statement_pipe)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StringResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#create_statement_pipe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_xapi_credential(xapi_credential, opts = {}) ⇒ StringResultSchema

Create a xAPI credential. Create a xAPI credential.

Parameters:

  • xapi_credential
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



81
82
83
84
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 81

def create_xapi_credential(xapi_credential, opts = {})
  data, _status_code, _headers = create_xapi_credential_with_http_info(xapi_credential, opts)
  data
end

#create_xapi_credential_with_http_info(xapi_credential, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Create a xAPI credential. Create a xAPI credential.

Parameters:

  • xapi_credential
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 91

def create_xapi_credential_with_http_info(xapi_credential, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.create_xapi_credential ...'
  end
  # verify the required parameter 'xapi_credential' is set
  if @api_client.config.client_side_validation && xapi_credential.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_credential' when calling XapiApi.create_xapi_credential"
  end
  # resource path
  local_var_path = '/xapi/credentials'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(xapi_credential)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StringResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#create_xapi_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_statement_pipe(statement_pipe_id, opts = {}) ⇒ nil

Deletes this xAPI pipe. Caution: avoid re-creating a pipe with the same ID quickly after a delete. The old version could still be processing, in which case the new pipe could be updated improperly by the processor.

Parameters:

  • statement_pipe_id

    id for this xAPI statement pipe

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


135
136
137
138
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 135

def delete_statement_pipe(statement_pipe_id, opts = {})
  delete_statement_pipe_with_http_info(statement_pipe_id, opts)
  nil
end

#delete_statement_pipe_with_http_info(statement_pipe_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Deletes this xAPI pipe. Caution: avoid re-creating a pipe with the same ID quickly after a delete. The old version could still be processing, in which case the new pipe could be updated improperly by the processor.

Parameters:

  • statement_pipe_id

    id for this xAPI statement pipe

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 145

def delete_statement_pipe_with_http_info(statement_pipe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.delete_statement_pipe ...'
  end
  # verify the required parameter 'statement_pipe_id' is set
  if @api_client.config.client_side_validation && statement_pipe_id.nil?
    fail ArgumentError, "Missing the required parameter 'statement_pipe_id' when calling XapiApi.delete_statement_pipe"
  end
  # resource path
  local_var_path = '/xapi/statementPipes/{statementPipeId}'.sub('{' + 'statementPipeId' + '}', statement_pipe_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#delete_statement_pipe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_xapi_credential(xapi_credential_id, opts = {}) ⇒ nil

Deletes the xAPI credentials specified by the xAPI credentials id Deletes the xAPI credentials specified by the xAPI credentials id

Parameters:

  • xapi_credential_id

    id for this xAPI credential

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


188
189
190
191
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 188

def delete_xapi_credential(xapi_credential_id, opts = {})
  delete_xapi_credential_with_http_info(xapi_credential_id, opts)
  nil
end

#delete_xapi_credential_with_http_info(xapi_credential_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Deletes the xAPI credentials specified by the xAPI credentials id Deletes the xAPI credentials specified by the xAPI credentials id

Parameters:

  • xapi_credential_id

    id for this xAPI credential

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 198

def delete_xapi_credential_with_http_info(xapi_credential_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.delete_xapi_credential ...'
  end
  # verify the required parameter 'xapi_credential_id' is set
  if @api_client.config.client_side_validation && xapi_credential_id.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_credential_id' when calling XapiApi.delete_xapi_credential"
  end
  # resource path
  local_var_path = '/xapi/credentials/{xapiCredentialId}'.sub('{' + 'xapiCredentialId' + '}', xapi_credential_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#delete_xapi_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_statement_pipe(statement_pipe_id, opts = {}) ⇒ XapiStatementPipeSchema

Retrieves xAPI pipe for ‘xapiPipeId` Retrieves xAPI pipe for `xapiPipeId`

Parameters:

  • statement_pipe_id

    id for this xAPI statement pipe

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



241
242
243
244
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 241

def get_statement_pipe(statement_pipe_id, opts = {})
  data, _status_code, _headers = get_statement_pipe_with_http_info(statement_pipe_id, opts)
  data
end

#get_statement_pipe_with_http_info(statement_pipe_id, opts = {}) ⇒ Array<(XapiStatementPipeSchema, Fixnum, Hash)>

Retrieves xAPI pipe for &#x60;xapiPipeId&#x60; Retrieves xAPI pipe for &#x60;xapiPipeId&#x60;

Parameters:

  • statement_pipe_id

    id for this xAPI statement pipe

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XapiStatementPipeSchema, Fixnum, Hash)>)

    XapiStatementPipeSchema data, response status code and response headers



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 251

def get_statement_pipe_with_http_info(statement_pipe_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.get_statement_pipe ...'
  end
  # verify the required parameter 'statement_pipe_id' is set
  if @api_client.config.client_side_validation && statement_pipe_id.nil?
    fail ArgumentError, "Missing the required parameter 'statement_pipe_id' when calling XapiApi.get_statement_pipe"
  end
  # resource path
  local_var_path = '/xapi/statementPipes/{statementPipeId}'.sub('{' + 'statementPipeId' + '}', statement_pipe_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiStatementPipeSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#get_statement_pipe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_statement_pipes(opts = {}) ⇒ XapiStatementPipeListSchema

Get all of the xapiPipes for ‘appId` Get all of the xapiPipes for `appId`

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



294
295
296
297
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 294

def get_statement_pipes(opts = {})
  data, _status_code, _headers = get_statement_pipes_with_http_info(opts)
  data
end

#get_statement_pipes_with_http_info(opts = {}) ⇒ Array<(XapiStatementPipeListSchema, Fixnum, Hash)>

Get all of the xapiPipes for &#x60;appId&#x60; Get all of the xapiPipes for &#x60;appId&#x60;

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 303

def get_statement_pipes_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.get_statement_pipes ...'
  end
  # resource path
  local_var_path = '/xapi/statementPipes'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiStatementPipeListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#get_statement_pipes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_xapi_credential(xapi_credential_id, opts = {}) ⇒ XapiCredentialSchema

Retrieves the xAPI credentials specified by the xAPI credentials id. Retrieves the xAPI credentials specified by the xAPI credentials id.

Parameters:

  • xapi_credential_id

    id for this xAPI credential

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



343
344
345
346
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 343

def get_xapi_credential(xapi_credential_id, opts = {})
  data, _status_code, _headers = get_xapi_credential_with_http_info(xapi_credential_id, opts)
  data
end

#get_xapi_credential_with_http_info(xapi_credential_id, opts = {}) ⇒ Array<(XapiCredentialSchema, Fixnum, Hash)>

Retrieves the xAPI credentials specified by the xAPI credentials id. Retrieves the xAPI credentials specified by the xAPI credentials id.

Parameters:

  • xapi_credential_id

    id for this xAPI credential

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XapiCredentialSchema, Fixnum, Hash)>)

    XapiCredentialSchema data, response status code and response headers



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 353

def get_xapi_credential_with_http_info(xapi_credential_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.get_xapi_credential ...'
  end
  # verify the required parameter 'xapi_credential_id' is set
  if @api_client.config.client_side_validation && xapi_credential_id.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_credential_id' when calling XapiApi.get_xapi_credential"
  end
  # resource path
  local_var_path = '/xapi/credentials/{xapiCredentialId}'.sub('{' + 'xapiCredentialId' + '}', xapi_credential_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiCredentialSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#get_xapi_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_xapi_credentials(opts = {}) ⇒ XapiCredentialsListSchema

Get the list of xapiCredentials Get the list of xapiCredentials

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only &lt;&lt;resourcePathName&gt;&gt; updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of &lt;&lt;resourcePathName&gt;&gt; lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:



398
399
400
401
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 398

def get_xapi_credentials(opts = {})
  data, _status_code, _headers = get_xapi_credentials_with_http_info(opts)
  data
end

#get_xapi_credentials_with_http_info(opts = {}) ⇒ Array<(XapiCredentialsListSchema, Fixnum, Hash)>

Get the list of xapiCredentials Get the list of xapiCredentials

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only &lt;&lt;resourcePathName&gt;&gt; updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of &lt;&lt;resourcePathName&gt;&gt; lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:

  • (Array<(XapiCredentialsListSchema, Fixnum, Hash)>)

    XapiCredentialsListSchema data, response status code and response headers



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 409

def get_xapi_credentials_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.get_xapi_credentials ...'
  end
  # resource path
  local_var_path = '/xapi/credentials'

  # query parameters
  query_params = {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiCredentialsListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#get_xapi_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_statement_pipe(statement_pipe_id, xapi_statement_pipe, opts = {}) ⇒ StringResultSchema

Edit an existing xAPI pipe or create a new one. Editing a pipe will cause it to start over and forward any statements it finds, even if the prior version of the pipe had already forwarded those statements. If the pipe being edited is currently being processed, the this request will fail with a status code of 409.

Parameters:

  • statement_pipe_id

    id for this xAPI statement pipe

  • xapi_statement_pipe
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



452
453
454
455
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 452

def set_statement_pipe(statement_pipe_id, xapi_statement_pipe, opts = {})
  data, _status_code, _headers = set_statement_pipe_with_http_info(statement_pipe_id, xapi_statement_pipe, opts)
  data
end

#set_statement_pipe_with_http_info(statement_pipe_id, xapi_statement_pipe, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Edit an existing xAPI pipe or create a new one. Editing a pipe will cause it to start over and forward any statements it finds, even if the prior version of the pipe had already forwarded those statements. If the pipe being edited is currently being processed, the this request will fail with a status code of 409.

Parameters:

  • statement_pipe_id

    id for this xAPI statement pipe

  • xapi_statement_pipe
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 463

def set_statement_pipe_with_http_info(statement_pipe_id, xapi_statement_pipe, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.set_statement_pipe ...'
  end
  # verify the required parameter 'statement_pipe_id' is set
  if @api_client.config.client_side_validation && statement_pipe_id.nil?
    fail ArgumentError, "Missing the required parameter 'statement_pipe_id' when calling XapiApi.set_statement_pipe"
  end
  # verify the required parameter 'xapi_statement_pipe' is set
  if @api_client.config.client_side_validation && xapi_statement_pipe.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_statement_pipe' when calling XapiApi.set_statement_pipe"
  end
  # resource path
  local_var_path = '/xapi/statementPipes/{statementPipeId}'.sub('{' + 'statementPipeId' + '}', statement_pipe_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(xapi_statement_pipe)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StringResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#set_statement_pipe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_xapi_credential(xapi_credential_id, xapi_credential, opts = {}) ⇒ nil

Edit an existing xAPI credential or create a new one, specified by the xAPI credentials id Edit an existing xAPI credential or create a new one, specified by the xAPI credentials id

Parameters:

  • xapi_credential_id

    id for this xAPI credential

  • xapi_credential
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


512
513
514
515
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 512

def set_xapi_credential(xapi_credential_id, xapi_credential, opts = {})
  set_xapi_credential_with_http_info(xapi_credential_id, xapi_credential, opts)
  nil
end

#set_xapi_credential_with_http_info(xapi_credential_id, xapi_credential, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Edit an existing xAPI credential or create a new one, specified by the xAPI credentials id Edit an existing xAPI credential or create a new one, specified by the xAPI credentials id

Parameters:

  • xapi_credential_id

    id for this xAPI credential

  • xapi_credential
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 523

def set_xapi_credential_with_http_info(xapi_credential_id, xapi_credential, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: XapiApi.set_xapi_credential ...'
  end
  # verify the required parameter 'xapi_credential_id' is set
  if @api_client.config.client_side_validation && xapi_credential_id.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_credential_id' when calling XapiApi.set_xapi_credential"
  end
  # verify the required parameter 'xapi_credential' is set
  if @api_client.config.client_side_validation && xapi_credential.nil?
    fail ArgumentError, "Missing the required parameter 'xapi_credential' when calling XapiApi.set_xapi_credential"
  end
  # resource path
  local_var_path = '/xapi/credentials/{xapiCredentialId}'.sub('{' + 'xapiCredentialId' + '}', xapi_credential_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(xapi_credential)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: XapiApi#set_xapi_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end