Class: ArtikCloud::MessagesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/artikcloud/api/messages_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MessagesApi

Returns a new instance of MessagesApi.



18
19
20
# File 'lib/artikcloud/api/messages_api.rb', line 18

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/artikcloud/api/messages_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#get_aggregates_histogram(start_date, end_date, opts = {}) ⇒ AggregatesHistogramResponse

Get Normalized Message Histogram Get Histogram on normalized messages.

Parameters:

  • start_date

    Timestamp of earliest message (in milliseconds since epoch).

  • end_date

    Timestamp of latest message (in milliseconds since epoch).

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

    the optional parameters

Options Hash (opts):

  • :sdid (String)

    Source device ID of the messages being searched.

  • :field (String)

    Message field being queried for building histogram.

  • :interval (String)

    Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year)

Returns:



31
32
33
34
# File 'lib/artikcloud/api/messages_api.rb', line 31

def get_aggregates_histogram(start_date, end_date, opts = {})
  data, _status_code, _headers = get_aggregates_histogram_with_http_info(start_date, end_date, opts)
  return data
end

#get_aggregates_histogram_with_http_info(start_date, end_date, opts = {}) ⇒ Array<(AggregatesHistogramResponse, Fixnum, Hash)>

Get Normalized Message Histogram Get Histogram on normalized messages.

Parameters:

  • start_date

    Timestamp of earliest message (in milliseconds since epoch).

  • end_date

    Timestamp of latest message (in milliseconds since epoch).

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

    the optional parameters

Options Hash (opts):

  • :sdid (String)

    Source device ID of the messages being searched.

  • :field (String)

    Message field being queried for building histogram.

  • :interval (String)

    Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year)

Returns:



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
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/artikcloud/api/messages_api.rb', line 45

def get_aggregates_histogram_with_http_info(start_date, end_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_aggregates_histogram ..."
  end
  # verify the required parameter 'start_date' is set
  fail ArgumentError, "Missing the required parameter 'start_date' when calling MessagesApi.get_aggregates_histogram" if start_date.nil?
  # verify the required parameter 'end_date' is set
  fail ArgumentError, "Missing the required parameter 'end_date' when calling MessagesApi.get_aggregates_histogram" if end_date.nil?
  # resource path
  local_var_path = "/messages/analytics/histogram".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'startDate'] = start_date
  query_params[:'endDate'] = end_date
  query_params[:'sdid'] = opts[:'sdid'] if !opts[:'sdid'].nil?
  query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
  query_params[:'interval'] = opts[:'interval'] if !opts[:'interval'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'AggregatesHistogramResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_aggregates_histogram\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_field_presence(start_date, end_date, interval, opts = {}) ⇒ FieldPresenceEnvelope

Get normalized message presence Get normalized message presence.

Parameters:

  • start_date

    startDate

  • end_date

    endDate

  • interval

    String representing grouping interval. One of: &#39;minute&#39; (1 hour limit), &#39;hour&#39; (1 day limit), &#39;day&#39; (31 days limit), &#39;month&#39; (1 year limit), or &#39;year&#39; (10 years limit).

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

    the optional parameters

Options Hash (opts):

  • :sdid (String)

    Source device ID of the messages being searched.

  • :field_presence (String)

    String representing a field from the specified device ID.

Returns:



97
98
99
100
# File 'lib/artikcloud/api/messages_api.rb', line 97

def get_field_presence(start_date, end_date, interval, opts = {})
  data, _status_code, _headers = get_field_presence_with_http_info(start_date, end_date, interval, opts)
  return data
end

#get_field_presence_with_http_info(start_date, end_date, interval, opts = {}) ⇒ Array<(FieldPresenceEnvelope, Fixnum, Hash)>

Get normalized message presence Get normalized message presence.

Parameters:

  • start_date

    startDate

  • end_date

    endDate

  • interval

    String representing grouping interval. One of: &#39;minute&#39; (1 hour limit), &#39;hour&#39; (1 day limit), &#39;day&#39; (31 days limit), &#39;month&#39; (1 year limit), or &#39;year&#39; (10 years limit).

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

    the optional parameters

Options Hash (opts):

  • :sdid (String)

    Source device ID of the messages being searched.

  • :field_presence (String)

    String representing a field from the specified device ID.

Returns:

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

    FieldPresenceEnvelope data, response status code and response headers



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/artikcloud/api/messages_api.rb', line 111

def get_field_presence_with_http_info(start_date, end_date, interval, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_field_presence ..."
  end
  # verify the required parameter 'start_date' is set
  fail ArgumentError, "Missing the required parameter 'start_date' when calling MessagesApi.get_field_presence" if start_date.nil?
  # verify the required parameter 'end_date' is set
  fail ArgumentError, "Missing the required parameter 'end_date' when calling MessagesApi.get_field_presence" if end_date.nil?
  # verify the required parameter 'interval' is set
  fail ArgumentError, "Missing the required parameter 'interval' when calling MessagesApi.get_field_presence" if interval.nil?
  # resource path
  local_var_path = "/messages/presence".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'startDate'] = start_date
  query_params[:'endDate'] = end_date
  query_params[:'interval'] = interval
  query_params[:'sdid'] = opts[:'sdid'] if !opts[:'sdid'].nil?
  query_params[:'fieldPresence'] = opts[:'field_presence'] if !opts[:'field_presence'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'FieldPresenceEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_field_presence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_last_normalized_messages(opts = {}) ⇒ NormalizedMessagesEnvelope

Get Last Normalized Message Get last messages normalized.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    Number of items to return per query.

  • :sdids (String)

    Comma separated list of source device IDs (minimum: 1).

  • :field_presence (String)

    String representing a field from the specified device ID.

Returns:



163
164
165
166
# File 'lib/artikcloud/api/messages_api.rb', line 163

def get_last_normalized_messages(opts = {})
  data, _status_code, _headers = get_last_normalized_messages_with_http_info(opts)
  return data
end

#get_last_normalized_messages_with_http_info(opts = {}) ⇒ Array<(NormalizedMessagesEnvelope, Fixnum, Hash)>

Get Last Normalized Message Get last messages normalized.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :count (Integer)

    Number of items to return per query.

  • :sdids (String)

    Comma separated list of source device IDs (minimum: 1).

  • :field_presence (String)

    String representing a field from the specified device ID.

Returns:

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

    NormalizedMessagesEnvelope data, response status code and response headers



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/artikcloud/api/messages_api.rb', line 175

def get_last_normalized_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_last_normalized_messages ..."
  end
  # resource path
  local_var_path = "/messages/last".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'sdids'] = opts[:'sdids'] if !opts[:'sdids'].nil?
  query_params[:'fieldPresence'] = opts[:'field_presence'] if !opts[:'field_presence'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'NormalizedMessagesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_last_normalized_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_message_aggregates(sdid, field, start_date, end_date, opts = {}) ⇒ AggregatesResponse

Get Normalized Message Aggregates Get Aggregates on normalized messages.

Parameters:

  • sdid

    Source device ID of the messages being searched.

  • field

    Message field being queried for aggregates.

  • start_date

    Timestamp of earliest message (in milliseconds since epoch).

  • end_date

    Timestamp of latest message (in milliseconds since epoch).

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

    the optional parameters

Returns:



220
221
222
223
# File 'lib/artikcloud/api/messages_api.rb', line 220

def get_message_aggregates(sdid, field, start_date, end_date, opts = {})
  data, _status_code, _headers = get_message_aggregates_with_http_info(sdid, field, start_date, end_date, opts)
  return data
end

#get_message_aggregates_with_http_info(sdid, field, start_date, end_date, opts = {}) ⇒ Array<(AggregatesResponse, Fixnum, Hash)>

Get Normalized Message Aggregates Get Aggregates on normalized messages.

Parameters:

  • sdid

    Source device ID of the messages being searched.

  • field

    Message field being queried for aggregates.

  • start_date

    Timestamp of earliest message (in milliseconds since epoch).

  • end_date

    Timestamp of latest message (in milliseconds since epoch).

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

    the optional parameters

Returns:

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

    AggregatesResponse data, response status code and response headers



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
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
# File 'lib/artikcloud/api/messages_api.rb', line 233

def get_message_aggregates_with_http_info(sdid, field, start_date, end_date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_message_aggregates ..."
  end
  # verify the required parameter 'sdid' is set
  fail ArgumentError, "Missing the required parameter 'sdid' when calling MessagesApi.get_message_aggregates" if sdid.nil?
  # verify the required parameter 'field' is set
  fail ArgumentError, "Missing the required parameter 'field' when calling MessagesApi.get_message_aggregates" if field.nil?
  # verify the required parameter 'start_date' is set
  fail ArgumentError, "Missing the required parameter 'start_date' when calling MessagesApi.get_message_aggregates" if start_date.nil?
  # verify the required parameter 'end_date' is set
  fail ArgumentError, "Missing the required parameter 'end_date' when calling MessagesApi.get_message_aggregates" if end_date.nil?
  # resource path
  local_var_path = "/messages/analytics/aggregates".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'sdid'] = sdid
  query_params[:'field'] = field
  query_params[:'startDate'] = start_date
  query_params[:'endDate'] = end_date

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'AggregatesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_message_aggregates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_message_snapshots(sdids, opts = {}) ⇒ SnapshotResponses

Get Message Snapshots Get message snapshots.

Parameters:

  • sdids

    Device IDs for which the snapshots are requested. Max 100 device ids per call.

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

    the optional parameters

Options Hash (opts):

  • :include_timestamp (BOOLEAN)

    Indicates whether to return timestamps of the last update for each field.

Returns:



285
286
287
288
# File 'lib/artikcloud/api/messages_api.rb', line 285

def get_message_snapshots(sdids, opts = {})
  data, _status_code, _headers = get_message_snapshots_with_http_info(sdids, opts)
  return data
end

#get_message_snapshots_with_http_info(sdids, opts = {}) ⇒ Array<(SnapshotResponses, Fixnum, Hash)>

Get Message Snapshots Get message snapshots.

Parameters:

  • sdids

    Device IDs for which the snapshots are requested. Max 100 device ids per call.

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

    the optional parameters

Options Hash (opts):

  • :include_timestamp (BOOLEAN)

    Indicates whether to return timestamps of the last update for each field.

Returns:

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

    SnapshotResponses data, response status code and response headers



296
297
298
299
300
301
302
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
# File 'lib/artikcloud/api/messages_api.rb', line 296

def get_message_snapshots_with_http_info(sdids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_message_snapshots ..."
  end
  # verify the required parameter 'sdids' is set
  fail ArgumentError, "Missing the required parameter 'sdids' when calling MessagesApi.get_message_snapshots" if sdids.nil?
  # resource path
  local_var_path = "/messages/snapshots".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'sdids'] = sdids
  query_params[:'includeTimestamp'] = opts[:'include_timestamp'] if !opts[:'include_timestamp'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'SnapshotResponses')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_message_snapshots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_normalized_actions(opts = {}) ⇒ NormalizedActionsEnvelope

Get Normalized Actions Get the actions normalized

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :uid (String)

    User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.

  • :ddid (String)

    Destination device ID of the actions being searched.

  • :mid (String)

    The message ID being searched.

  • :offset (String)

    A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)

  • :count (Integer)

    count

  • :start_date (Integer)

    startDate

  • :end_date (Integer)

    endDate

  • :order (String)

    Desired sort order: &#39;asc&#39; or &#39;desc&#39;

Returns:



346
347
348
349
# File 'lib/artikcloud/api/messages_api.rb', line 346

def get_normalized_actions(opts = {})
  data, _status_code, _headers = get_normalized_actions_with_http_info(opts)
  return data
end

#get_normalized_actions_with_http_info(opts = {}) ⇒ Array<(NormalizedActionsEnvelope, Fixnum, Hash)>

Get Normalized Actions Get the actions normalized

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :uid (String)

    User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.

  • :ddid (String)

    Destination device ID of the actions being searched.

  • :mid (String)

    The message ID being searched.

  • :offset (String)

    A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)

  • :count (Integer)

    count

  • :start_date (Integer)

    startDate

  • :end_date (Integer)

    endDate

  • :order (String)

    Desired sort order: &#39;asc&#39; or &#39;desc&#39;

Returns:

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

    NormalizedActionsEnvelope data, response status code and response headers



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
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/artikcloud/api/messages_api.rb', line 363

def get_normalized_actions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_normalized_actions ..."
  end
  # resource path
  local_var_path = "/actions".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'uid'] = opts[:'uid'] if !opts[:'uid'].nil?
  query_params[:'ddid'] = opts[:'ddid'] if !opts[:'ddid'].nil?
  query_params[:'mid'] = opts[:'mid'] if !opts[:'mid'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'NormalizedActionsEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_normalized_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_normalized_messages(opts = {}) ⇒ NormalizedMessagesEnvelope

Get Normalized Messages Get the messages normalized

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :uid (String)

    User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.

  • :sdid (String)

    Source device ID of the messages being searched.

  • :mid (String)

    The message ID being searched.

  • :field_presence (String)

    String representing a field from the specified device ID.

  • :filter (String)

    Filter.

  • :offset (String)

    A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)

  • :count (Integer)

    count

  • :start_date (Integer)

    startDate

  • :end_date (Integer)

    endDate

  • :order (String)

    Desired sort order: &#39;asc&#39; or &#39;desc&#39;

Returns:



419
420
421
422
# File 'lib/artikcloud/api/messages_api.rb', line 419

def get_normalized_messages(opts = {})
  data, _status_code, _headers = get_normalized_messages_with_http_info(opts)
  return data
end

#get_normalized_messages_with_http_info(opts = {}) ⇒ Array<(NormalizedMessagesEnvelope, Fixnum, Hash)>

Get Normalized Messages Get the messages normalized

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :uid (String)

    User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.

  • :sdid (String)

    Source device ID of the messages being searched.

  • :mid (String)

    The message ID being searched.

  • :field_presence (String)

    String representing a field from the specified device ID.

  • :filter (String)

    Filter.

  • :offset (String)

    A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)

  • :count (Integer)

    count

  • :start_date (Integer)

    startDate

  • :end_date (Integer)

    endDate

  • :order (String)

    Desired sort order: &#39;asc&#39; or &#39;desc&#39;

Returns:

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

    NormalizedMessagesEnvelope data, response status code and response headers



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/artikcloud/api/messages_api.rb', line 438

def get_normalized_messages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.get_normalized_messages ..."
  end
  # resource path
  local_var_path = "/messages".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'uid'] = opts[:'uid'] if !opts[:'uid'].nil?
  query_params[:'sdid'] = opts[:'sdid'] if !opts[:'sdid'].nil?
  query_params[:'mid'] = opts[:'mid'] if !opts[:'mid'].nil?
  query_params[:'fieldPresence'] = opts[:'field_presence'] if !opts[:'field_presence'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['artikcloud_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 => 'NormalizedMessagesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#get_normalized_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_actions(data, opts = {}) ⇒ MessageIDEnvelope

Send Actions Send Actions

Parameters:

  • data

    Actions that are passed in the body

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

    the optional parameters

Returns:



487
488
489
490
# File 'lib/artikcloud/api/messages_api.rb', line 487

def send_actions(data, opts = {})
  data, _status_code, _headers = send_actions_with_http_info(data, opts)
  return data
end

#send_actions_with_http_info(data, opts = {}) ⇒ Array<(MessageIDEnvelope, Fixnum, Hash)>

Send Actions Send Actions

Parameters:

  • data

    Actions that are passed in the body

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

    the optional parameters

Returns:

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

    MessageIDEnvelope data, response status code and response headers



497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/artikcloud/api/messages_api.rb', line 497

def send_actions_with_http_info(data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.send_actions ..."
  end
  # verify the required parameter 'data' is set
  fail ArgumentError, "Missing the required parameter 'data' when calling MessagesApi.send_actions" if data.nil?
  # resource path
  local_var_path = "/actions".sub('{format}','json')

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['artikcloud_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 => 'MessageIDEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#send_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_message(data, opts = {}) ⇒ MessageIDEnvelope

Send Message Send a message

Parameters:

  • data

    Message object that is passed in the body

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

    the optional parameters

Returns:



538
539
540
541
# File 'lib/artikcloud/api/messages_api.rb', line 538

def send_message(data, opts = {})
  data, _status_code, _headers = send_message_with_http_info(data, opts)
  return data
end

#send_message_with_http_info(data, opts = {}) ⇒ Array<(MessageIDEnvelope, Fixnum, Hash)>

Send Message Send a message

Parameters:

  • data

    Message object that is passed in the body

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

    the optional parameters

Returns:

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

    MessageIDEnvelope data, response status code and response headers



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
580
581
582
# File 'lib/artikcloud/api/messages_api.rb', line 548

def send_message_with_http_info(data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MessagesApi.send_message ..."
  end
  # verify the required parameter 'data' is set
  fail ArgumentError, "Missing the required parameter 'data' when calling MessagesApi.send_message" if data.nil?
  # resource path
  local_var_path = "/messages".sub('{format}','json')

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(data)
  auth_names = ['artikcloud_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 => 'MessageIDEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MessagesApi#send_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end