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 Creates an xAPI statement pipe. >Note: >This method is asynchronous. A returned success status indicates a background process has been started, but there will still be a delay before the creation of the xAPI statement pipe takes place.

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 Creates an xAPI statement pipe. &gt;Note: &gt;This method is asynchronous. A returned success status indicates a background process has been started, but there will still be a delay before the creation of the xAPI statement pipe takes place.

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 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 xAPI Credentials Creates an xAPI credential combination from the provided secret and a generated ID.

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 xAPI Credentials Creates an xAPI credential combination from the provided secret and a generated ID.

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 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

Delete an xAPI Statement Pipe Deletes the specified xAPI statement pipe >Note: >This method is asynchronous. A returned success status indicates a background process has been started, but there will still be a delay before the deletion takes place. Recreating a statement pipe with the same ID too quickly could cause the statement pipe to end up in a faulty state.

Parameters:

  • statement_pipe_id
  • 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)>

Delete an xAPI Statement Pipe Deletes the specified xAPI statement pipe &gt;Note: &gt;This method is asynchronous. A returned success status indicates a background process has been started, but there will still be a delay before the deletion takes place. Recreating a statement pipe with the same ID too quickly could cause the statement pipe to end up in a faulty state.

Parameters:

  • statement_pipe_id
  • 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 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

Delete xAPI Credentials Deletes the specified xAPI credentials.

Parameters:

  • xapi_credential_id
  • 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)>

Delete xAPI Credentials Deletes the specified xAPI credentials.

Parameters:

  • xapi_credential_id
  • 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 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

Get detailed information about an xAPI Statement Pipe Returns detailed information about the xAPI pipe. This includes source and target urls, the last time a statement was successfully forwarded, and how many attempts have been made to send data to the target url.

Parameters:

  • statement_pipe_id
  • 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)>

Get detailed information about an xAPI Statement Pipe Returns detailed information about the xAPI pipe. This includes source and target urls, the last time a statement was successfully forwarded, and how many attempts have been made to send data to the target url.

Parameters:

  • statement_pipe_id
  • 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 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 a list of xAPI Statement Pipes Returns a list of all xAPI statement pipes.

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 a list of xAPI Statement Pipes Returns a list of all xAPI statement pipes.

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

Get detailed information about the xAPI Credentials Returns detailed information about the xAPI credentials. This includes the id (username), secret (password), permissions, and whether or not the credentials are enabled.

Parameters:

  • xapi_credential_id
  • 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)>

Get detailed information about the xAPI Credentials Returns detailed information about the xAPI credentials. This includes the id (username), secret (password), permissions, and whether or not the credentials are enabled.

Parameters:

  • xapi_credential_id
  • 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 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 a list of xAPI Credentials Returns a list of xAPI credentials. Can be filtered using the request parameters to provide a subset of results. >Note: >This request is paginated and will only provide a limited amount of resources at a time. If there are more results to be collected, a ‘more` token provided with the response which can be passed to get the next page of results. When passing this token, no other filter parameters can be sent as part of the request. The resources will continue to respect the filters passed in by the original request.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :datetime_filter (String)

    Specifies field that &#x60;since&#x60; and &#x60;until&#x60; parameters are applied against (default to updated)

  • :filter (String)

    Optional string which filters results by a specified field (described by filterBy).

  • :filter_by (String)

    Optional enum parameter for specifying the field on which to run the filter. (default to credential_id)

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results. (default to updated_asc)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:



403
404
405
406
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 403

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 a list of xAPI Credentials Returns a list of xAPI credentials. Can be filtered using the request parameters to provide a subset of results. &gt;Note: &gt;This request is paginated and will only provide a limited amount of resources at a time. If there are more results to be collected, a &#x60;more&#x60; token provided with the response which can be passed to get the next page of results. When passing this token, no other filter parameters can be sent as part of the request. The resources will continue to respect the filters passed in by the original request.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :datetime_filter (String)

    Specifies field that &#x60;since&#x60; and &#x60;until&#x60; parameters are applied against

  • :filter (String)

    Optional string which filters results by a specified field (described by filterBy).

  • :filter_by (String)

    Optional enum parameter for specifying the field on which to run the filter.

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results.

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:

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

    XapiCredentialsListSchema data, response status code and response headers



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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 419

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[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'datetimeFilter'] = opts[:'datetime_filter'] if !opts[:'datetime_filter'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'filterBy'] = opts[:'filter_by'] if !opts[:'filter_by'].nil?
  query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].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

Create or update an xAPI Statement Pipe Creates or updates information about the xAPI statement pipe. - If the xAPI statement pipe is instead being updated, the pipe will start over and forward any statements it finds, even if it had already forwarded those statements. If the pipe being edited is currently being processed, then this request will fail with a status code of 409. >Note: >This method is asynchronous. A returned success status indicates a background process has been started, but there will still be a delay before the creation of the xAPI statement pipe takes place.

Parameters:

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

    the optional parameters

Returns:



467
468
469
470
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 467

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)>

Create or update an xAPI Statement Pipe Creates or updates information about the xAPI statement pipe. - If the xAPI statement pipe is instead being updated, the pipe will start over and forward any statements it finds, even if it had already forwarded those statements. If the pipe being edited is currently being processed, then this request will fail with a status code of 409. &gt;Note: &gt;This method is asynchronous. A returned success status indicates a background process has been started, but there will still be a delay before the creation of the xAPI statement pipe takes place.

Parameters:

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

    the optional parameters

Returns:

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

    StringResultSchema data, response status code and response headers



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
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 478

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 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 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

Create or update xAPI Credentials Creates or updates information about the xAPI credentials.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


527
528
529
530
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 527

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)>

Create or update xAPI Credentials Creates or updates information about the xAPI credentials.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
# File 'lib/rustici_software_cloud_v2/api/xapi_api.rb', line 538

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 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 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