Class: ArtikCloud::DeviceTypesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DeviceTypesApi

Returns a new instance of DeviceTypesApi.



18
19
20
# File 'lib/artikcloud/api/device_types_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/device_types_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#get_available_manifest_versions(device_type_id, opts = {}) ⇒ ManifestVersionsEnvelope

Get Available Manifest Versions Get a Device Type’s available manifest versions

Parameters:

  • device_type_id

    deviceTypeId

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/artikcloud/api/device_types_api.rb', line 27

def get_available_manifest_versions(device_type_id, opts = {})
  data, _status_code, _headers = get_available_manifest_versions_with_http_info(device_type_id, opts)
  return data
end

#get_available_manifest_versions_with_http_info(device_type_id, opts = {}) ⇒ Array<(ManifestVersionsEnvelope, Fixnum, Hash)>

Get Available Manifest Versions Get a Device Type&#39;s available manifest versions

Parameters:

  • device_type_id

    deviceTypeId

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

    the optional parameters

Returns:

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

    ManifestVersionsEnvelope 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
# File 'lib/artikcloud/api/device_types_api.rb', line 37

def get_available_manifest_versions_with_http_info(device_type_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DeviceTypesApi.get_available_manifest_versions ..."
  end
  # verify the required parameter 'device_type_id' is set
  fail ArgumentError, "Missing the required parameter 'device_type_id' when calling DeviceTypesApi.get_available_manifest_versions" if device_type_id.nil?
  # resource path
  local_var_path = "/devicetypes/{deviceTypeId}/availablemanifestversions".sub('{format}','json').sub('{' + 'deviceTypeId' + '}', device_type_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'])

  # 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 => 'ManifestVersionsEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeviceTypesApi#get_available_manifest_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_device_type(device_type_id, opts = {}) ⇒ DeviceTypeEnvelope

Get Device Type Retrieves a Device Type

Parameters:

  • device_type_id

    deviceTypeId

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

    the optional parameters

Returns:



78
79
80
81
# File 'lib/artikcloud/api/device_types_api.rb', line 78

def get_device_type(device_type_id, opts = {})
  data, _status_code, _headers = get_device_type_with_http_info(device_type_id, opts)
  return data
end

#get_device_type_with_http_info(device_type_id, opts = {}) ⇒ Array<(DeviceTypeEnvelope, Fixnum, Hash)>

Get Device Type Retrieves a Device Type

Parameters:

  • device_type_id

    deviceTypeId

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

    the optional parameters

Returns:

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

    DeviceTypeEnvelope data, response status code and response headers



88
89
90
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
# File 'lib/artikcloud/api/device_types_api.rb', line 88

def get_device_type_with_http_info(device_type_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DeviceTypesApi.get_device_type ..."
  end
  # verify the required parameter 'device_type_id' is set
  fail ArgumentError, "Missing the required parameter 'device_type_id' when calling DeviceTypesApi.get_device_type" if device_type_id.nil?
  # resource path
  local_var_path = "/devicetypes/{deviceTypeId}".sub('{format}','json').sub('{' + 'deviceTypeId' + '}', device_type_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'])

  # 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 => 'DeviceTypeEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeviceTypesApi#get_device_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_device_types(name, opts = {}) ⇒ DeviceTypesEnvelope

Get Device Types Retrieves Device Types

Parameters:

  • name

    Device Type name

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    Offset for pagination.

  • :count (Integer)

    Desired count of items in the result set

  • :tags (String)

    Elements tagged with the list of tags. (comma separated)

Returns:



132
133
134
135
# File 'lib/artikcloud/api/device_types_api.rb', line 132

def get_device_types(name, opts = {})
  data, _status_code, _headers = get_device_types_with_http_info(name, opts)
  return data
end

#get_device_types_by_application(app_id, opts = {}) ⇒ DeviceTypesEnvelope

Get Device Types by Application Get Device Types by Application

Parameters:

  • app_id

    Application ID.

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

    the optional parameters

Options Hash (opts):

  • :product_info (BOOLEAN)

    Flag to include the associated ProductInfo if present

  • :count (Integer)

    Desired count of items in the result set.

  • :offset (Integer)

    Offset for pagination.

Returns:



193
194
195
196
# File 'lib/artikcloud/api/device_types_api.rb', line 193

def get_device_types_by_application(app_id, opts = {})
  data, _status_code, _headers = get_device_types_by_application_with_http_info(app_id, opts)
  return data
end

#get_device_types_by_application_with_http_info(app_id, opts = {}) ⇒ Array<(DeviceTypesEnvelope, Fixnum, Hash)>

Get Device Types by Application Get Device Types by Application

Parameters:

  • app_id

    Application ID.

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

    the optional parameters

Options Hash (opts):

  • :product_info (BOOLEAN)

    Flag to include the associated ProductInfo if present

  • :count (Integer)

    Desired count of items in the result set.

  • :offset (Integer)

    Offset for pagination.

Returns:

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

    DeviceTypesEnvelope data, response status code and response headers



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
236
237
238
239
240
241
242
243
# File 'lib/artikcloud/api/device_types_api.rb', line 206

def get_device_types_by_application_with_http_info(app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DeviceTypesApi.get_device_types_by_application ..."
  end
  # verify the required parameter 'app_id' is set
  fail ArgumentError, "Missing the required parameter 'app_id' when calling DeviceTypesApi.get_device_types_by_application" if app_id.nil?
  # resource path
  local_var_path = "/applications/{appId}/devicetypes".sub('{format}','json').sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'productInfo'] = opts[:'product_info'] if !opts[:'product_info'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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 => 'DeviceTypesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeviceTypesApi#get_device_types_by_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_device_types_with_http_info(name, opts = {}) ⇒ Array<(DeviceTypesEnvelope, Fixnum, Hash)>

Get Device Types Retrieves Device Types

Parameters:

  • name

    Device Type name

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

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    Offset for pagination.

  • :count (Integer)

    Desired count of items in the result set

  • :tags (String)

    Elements tagged with the list of tags. (comma separated)

Returns:

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

    DeviceTypesEnvelope data, 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
183
# File 'lib/artikcloud/api/device_types_api.rb', line 145

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

  # query parameters
  query_params = {}
  query_params[:'name'] = name
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].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 => 'DeviceTypesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeviceTypesApi#get_device_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_latest_manifest_properties(device_type_id, opts = {}) ⇒ ManifestPropertiesEnvelope

Get Latest Manifest Properties Get a Device Type’s manifest properties for the latest version.

Parameters:

  • device_type_id

    Device Type ID.

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

    the optional parameters

Returns:



250
251
252
253
# File 'lib/artikcloud/api/device_types_api.rb', line 250

def get_latest_manifest_properties(device_type_id, opts = {})
  data, _status_code, _headers = get_latest_manifest_properties_with_http_info(device_type_id, opts)
  return data
end

#get_latest_manifest_properties_with_http_info(device_type_id, opts = {}) ⇒ Array<(ManifestPropertiesEnvelope, Fixnum, Hash)>

Get Latest Manifest Properties Get a Device Type&#39;s manifest properties for the latest version.

Parameters:

  • device_type_id

    Device Type ID.

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

    the optional parameters

Returns:

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

    ManifestPropertiesEnvelope data, response status code and response headers



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
290
291
292
293
294
# File 'lib/artikcloud/api/device_types_api.rb', line 260

def get_latest_manifest_properties_with_http_info(device_type_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DeviceTypesApi.get_latest_manifest_properties ..."
  end
  # verify the required parameter 'device_type_id' is set
  fail ArgumentError, "Missing the required parameter 'device_type_id' when calling DeviceTypesApi.get_latest_manifest_properties" if device_type_id.nil?
  # resource path
  local_var_path = "/devicetypes/{deviceTypeId}/manifests/latest/properties".sub('{format}','json').sub('{' + 'deviceTypeId' + '}', device_type_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'])

  # 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 => 'ManifestPropertiesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeviceTypesApi#get_latest_manifest_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_manifest_properties(device_type_id, version, opts = {}) ⇒ ManifestPropertiesEnvelope

Get manifest properties Get a Device Type’s manifest properties for a specific version.

Parameters:

  • device_type_id

    Device Type ID.

  • version

    Manifest Version.

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

    the optional parameters

Returns:



302
303
304
305
# File 'lib/artikcloud/api/device_types_api.rb', line 302

def get_manifest_properties(device_type_id, version, opts = {})
  data, _status_code, _headers = get_manifest_properties_with_http_info(device_type_id, version, opts)
  return data
end

#get_manifest_properties_with_http_info(device_type_id, version, opts = {}) ⇒ Array<(ManifestPropertiesEnvelope, Fixnum, Hash)>

Get manifest properties Get a Device Type&#39;s manifest properties for a specific version.

Parameters:

  • device_type_id

    Device Type ID.

  • version

    Manifest Version.

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

    the optional parameters

Returns:

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

    ManifestPropertiesEnvelope data, response status code and response headers



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
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/artikcloud/api/device_types_api.rb', line 313

def get_manifest_properties_with_http_info(device_type_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DeviceTypesApi.get_manifest_properties ..."
  end
  # verify the required parameter 'device_type_id' is set
  fail ArgumentError, "Missing the required parameter 'device_type_id' when calling DeviceTypesApi.get_manifest_properties" if device_type_id.nil?
  # verify the required parameter 'version' is set
  fail ArgumentError, "Missing the required parameter 'version' when calling DeviceTypesApi.get_manifest_properties" if version.nil?
  # resource path
  local_var_path = "/devicetypes/{deviceTypeId}/manifests/{version}/properties".sub('{format}','json').sub('{' + 'deviceTypeId' + '}', device_type_id.to_s).sub('{' + 'version' + '}', version.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'])

  # 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 => 'ManifestPropertiesEnvelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DeviceTypesApi#get_manifest_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end