Class: Nodeum::MetadataApi

Inherits:
Object
  • Object
show all
Defined in:
lib/nodeum_sdk/api/metadata_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MetadataApi

Returns a new instance of MetadataApi.



19
20
21
# File 'lib/nodeum_sdk/api/metadata_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/nodeum_sdk/api/metadata_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#index_file_metadata_definitions(opts = {}) ⇒ FileMetadataDefinitionCollection

List file metadata definitions **API Key Scope**: file_metadata_definitions / index

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:



28
29
30
31
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 28

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

#index_file_metadata_definitions_with_http_info(opts = {}) ⇒ Array<(FileMetadataDefinitionCollection, Integer, Hash)>

List file metadata definitions **API Key Scope**: file_metadata_definitions / index

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:



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
76
77
78
79
80
81
82
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 39

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetadataApi.index_file_metadata_definitions ...'
  end
  # resource path
  local_var_path = '/file_metadata_definitions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'FileMetadataDefinitionCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#index_file_metadata_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#index_task_metadata_definitions(opts = {}) ⇒ TaskMetadataDefinitionCollection

List task metadata definitions **API Key Scope**: task_metadata_definitions / index

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:



90
91
92
93
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 90

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

#index_task_metadata_definitions_with_http_info(opts = {}) ⇒ Array<(TaskMetadataDefinitionCollection, Integer, Hash)>

List task metadata definitions **API Key Scope**: task_metadata_definitions / index

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The number of items to display for pagination.

  • :offset (Integer)

    The number of items to skip for pagination.

Returns:



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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 101

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetadataApi.index_task_metadata_definitions ...'
  end
  # resource path
  local_var_path = '/task_metadata_definitions'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TaskMetadataDefinitionCollection' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#index_task_metadata_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_file_metadata_definition(metadata_definition_id, opts = {}) ⇒ FileMetadataDefinition

Displays a specific task metadata definition. **API Key Scope**: file_metadata_definitions / show

Parameters:

  • metadata_definition_id (String)

    Numeric ID or key of a metadata definition

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

    the optional parameters

Returns:



151
152
153
154
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 151

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

#show_file_metadata_definition_with_http_info(metadata_definition_id, opts = {}) ⇒ Array<(FileMetadataDefinition, Integer, Hash)>

Displays a specific task metadata definition. **API Key Scope**: file_metadata_definitions / show

Parameters:

  • metadata_definition_id (String)

    Numeric ID or key of a metadata definition

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

    the optional parameters

Returns:

  • (Array<(FileMetadataDefinition, Integer, Hash)>)

    FileMetadataDefinition data, response status code and response headers



161
162
163
164
165
166
167
168
169
170
171
172
173
174
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
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 161

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetadataApi.show_file_metadata_definition ...'
  end
  # verify the required parameter 'metadata_definition_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'metadata_definition_id' when calling MetadataApi.show_file_metadata_definition"
  end
  # resource path
  local_var_path = '/file_metadata_definitions/{metadata_definition_id}'.sub('{' + 'metadata_definition_id' + '}', CGI.escape(.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'FileMetadataDefinition' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#show_file_metadata_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_task_metadata_definition(metadata_definition_id, opts = {}) ⇒ TaskMetadataDefinition

Displays a specific task metadata definition. **API Key Scope**: task_metadata_definitions / show

Parameters:

  • metadata_definition_id (String)

    Numeric ID or key of a metadata definition

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

    the optional parameters

Returns:



213
214
215
216
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 213

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

#show_task_metadata_definition_with_http_info(metadata_definition_id, opts = {}) ⇒ Array<(TaskMetadataDefinition, Integer, Hash)>

Displays a specific task metadata definition. **API Key Scope**: task_metadata_definitions / show

Parameters:

  • metadata_definition_id (String)

    Numeric ID or key of a metadata definition

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

    the optional parameters

Returns:

  • (Array<(TaskMetadataDefinition, Integer, Hash)>)

    TaskMetadataDefinition data, response status code and response headers



223
224
225
226
227
228
229
230
231
232
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
# File 'lib/nodeum_sdk/api/metadata_api.rb', line 223

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MetadataApi.show_task_metadata_definition ...'
  end
  # verify the required parameter 'metadata_definition_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'metadata_definition_id' when calling MetadataApi.show_task_metadata_definition"
  end
  # resource path
  local_var_path = '/task_metadata_definitions/{metadata_definition_id}'.sub('{' + 'metadata_definition_id' + '}', CGI.escape(.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

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

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'TaskMetadataDefinition' 

  # auth_names
  auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MetadataApi#show_task_metadata_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end