Class: Metronome::ItemAccessApi
- Inherits:
-
Object
- Object
- Metronome::ItemAccessApi
- Defined in:
- lib/metronome/api/item_access_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#expire_item(item_id, opts = {}) ⇒ ExpireItemResponse
Expire an item and its sub-items immediately.
-
#expire_item_with_http_info(item_id, opts = {}) ⇒ Array<(ExpireItemResponse, Integer, Hash)>
Expire an item and its sub-items immediately.
-
#expire_sub_item(item_id, sub_item_id, opts = {}) ⇒ ExpireSubItemResponse
Expire a sub-item immediately.
-
#expire_sub_item_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(ExpireSubItemResponse, Integer, Hash)>
Expire a sub-item immediately.
-
#get_item_log(item_id, opts = {}) ⇒ ItemOrSubItemAccessLog
Read a specific item’s access log.
-
#get_item_log_with_http_info(item_id, opts = {}) ⇒ Array<(ItemOrSubItemAccessLog, Integer, Hash)>
Read a specific item's access log.
-
#get_item_metadata(item_id, opts = {}) ⇒ ItemMetadataResponse
Read a specific item’s metadata with or without any sub-items.
-
#get_item_metadata_with_http_info(item_id, opts = {}) ⇒ Array<(ItemMetadataResponse, Integer, Hash)>
Read a specific item's metadata with or without any sub-items.
-
#get_item_policies(item_id, opts = {}) ⇒ ItemOrSubItemPolicyResponse
Read which policies have been applied to a specific item.
-
#get_item_policies_with_http_info(item_id, opts = {}) ⇒ Array<(ItemOrSubItemPolicyResponse, Integer, Hash)>
Read which policies have been applied to a specific item.
-
#get_sub_item_log(item_id, sub_item_id, opts = {}) ⇒ ItemOrSubItemAccessLog
Read a specific sub-item’s access log.
-
#get_sub_item_log_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(ItemOrSubItemAccessLog, Integer, Hash)>
Read a specific sub-item's access log.
-
#get_sub_item_metadata(item_id, sub_item_id, opts = {}) ⇒ SubItemMetadataResponse
Read a specific sub-item’s metadata.
-
#get_sub_item_metadata_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(SubItemMetadataResponse, Integer, Hash)>
Read a specific sub-item's metadata.
-
#get_sub_item_policies(item_id, sub_item_id, opts = {}) ⇒ ItemOrSubItemPolicyResponse
Read which policies have been applied to a specific sub-item.
-
#get_sub_item_policies_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(ItemOrSubItemPolicyResponse, Integer, Hash)>
Read which policies have been applied to a specific sub-item.
-
#initialize(api_client = ApiClient.default) ⇒ ItemAccessApi
constructor
A new instance of ItemAccessApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ItemAccessApi
Returns a new instance of ItemAccessApi.
19 20 21 |
# File 'lib/metronome/api/item_access_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/metronome/api/item_access_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#expire_item(item_id, opts = {}) ⇒ ExpireItemResponse
Expire an item and its sub-items immediately
26 27 28 29 |
# File 'lib/metronome/api/item_access_api.rb', line 26 def expire_item(item_id, opts = {}) data, _status_code, _headers = expire_item_with_http_info(item_id, opts) data end |
#expire_item_with_http_info(item_id, opts = {}) ⇒ Array<(ExpireItemResponse, Integer, Hash)>
Expire an item and its sub-items immediately
35 36 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 76 77 78 79 80 81 |
# File 'lib/metronome/api/item_access_api.rb', line 35 def expire_item_with_http_info(item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.expire_item ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.expire_item" end # resource path local_var_path = '/v1/metronome/items/{item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExpireItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.expire_item", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#expire_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#expire_sub_item(item_id, sub_item_id, opts = {}) ⇒ ExpireSubItemResponse
Expire a sub-item immediately
88 89 90 91 |
# File 'lib/metronome/api/item_access_api.rb', line 88 def expire_sub_item(item_id, sub_item_id, opts = {}) data, _status_code, _headers = expire_sub_item_with_http_info(item_id, sub_item_id, opts) data end |
#expire_sub_item_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(ExpireSubItemResponse, Integer, Hash)>
Expire a sub-item immediately
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 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/metronome/api/item_access_api.rb', line 98 def expire_sub_item_with_http_info(item_id, sub_item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.expire_sub_item ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.expire_sub_item" end # verify the required parameter 'sub_item_id' is set if @api_client.config.client_side_validation && sub_item_id.nil? fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.expire_sub_item" end # resource path local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ExpireSubItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.expire_sub_item", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#expire_sub_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_item_log(item_id, opts = {}) ⇒ ItemOrSubItemAccessLog
Read a specific item’s access log
156 157 158 159 |
# File 'lib/metronome/api/item_access_api.rb', line 156 def get_item_log(item_id, opts = {}) data, _status_code, _headers = get_item_log_with_http_info(item_id, opts) data end |
#get_item_log_with_http_info(item_id, opts = {}) ⇒ Array<(ItemOrSubItemAccessLog, Integer, Hash)>
Read a specific item's access log
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 207 208 209 210 211 212 213 214 215 |
# File 'lib/metronome/api/item_access_api.rb', line 167 def get_item_log_with_http_info(item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.get_item_log ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_item_log" end # resource path local_var_path = '/v1/metronome/items/{item-id}/log'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'start-date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end-date'] = opts[:'end_date'] if !opts[:'end_date'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ItemOrSubItemAccessLog' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.get_item_log", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#get_item_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_item_metadata(item_id, opts = {}) ⇒ ItemMetadataResponse
Read a specific item’s metadata with or without any sub-items.
224 225 226 227 |
# File 'lib/metronome/api/item_access_api.rb', line 224 def (item_id, opts = {}) data, _status_code, _headers = (item_id, opts) data end |
#get_item_metadata_with_http_info(item_id, opts = {}) ⇒ Array<(ItemMetadataResponse, Integer, Hash)>
Read a specific item's metadata with or without any sub-items.
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 278 279 280 281 282 283 284 285 |
# File 'lib/metronome/api/item_access_api.rb', line 236 def (item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.get_item_metadata ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_item_metadata" end # resource path local_var_path = '/v1/metronome/items/{item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'all-sub-items'] = opts[:'all_sub_items'] if !opts[:'all_sub_items'].nil? query_params[:'no-item-content'] = opts[:'no_item_content'] if !opts[:'no_item_content'].nil? query_params[:'sub-item'] = @api_client.build_collection_param(opts[:'sub_item'], :multi) if !opts[:'sub_item'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ItemMetadataResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.get_item_metadata", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#get_item_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_item_policies(item_id, opts = {}) ⇒ ItemOrSubItemPolicyResponse
Read which policies have been applied to a specific item
291 292 293 294 |
# File 'lib/metronome/api/item_access_api.rb', line 291 def get_item_policies(item_id, opts = {}) data, _status_code, _headers = get_item_policies_with_http_info(item_id, opts) data end |
#get_item_policies_with_http_info(item_id, opts = {}) ⇒ Array<(ItemOrSubItemPolicyResponse, Integer, Hash)>
Read which policies have been applied to a specific item
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 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/metronome/api/item_access_api.rb', line 300 def get_item_policies_with_http_info(item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.get_item_policies ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_item_policies" end # resource path local_var_path = '/v1/metronome/items/{item-id}/policies'.sub('{' + 'item-id' + '}', CGI.escape(item_id.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ItemOrSubItemPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.get_item_policies", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#get_item_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sub_item_log(item_id, sub_item_id, opts = {}) ⇒ ItemOrSubItemAccessLog
Read a specific sub-item’s access log
353 354 355 356 |
# File 'lib/metronome/api/item_access_api.rb', line 353 def get_sub_item_log(item_id, sub_item_id, opts = {}) data, _status_code, _headers = get_sub_item_log_with_http_info(item_id, sub_item_id, opts) data end |
#get_sub_item_log_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(ItemOrSubItemAccessLog, Integer, Hash)>
Read a specific sub-item's access log
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 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/metronome/api/item_access_api.rb', line 363 def get_sub_item_log_with_http_info(item_id, sub_item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.get_sub_item_log ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_sub_item_log" end # verify the required parameter 'sub_item_id' is set if @api_client.config.client_side_validation && sub_item_id.nil? fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.get_sub_item_log" end # resource path local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}/log'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ItemOrSubItemAccessLog' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.get_sub_item_log", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#get_sub_item_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sub_item_metadata(item_id, sub_item_id, opts = {}) ⇒ SubItemMetadataResponse
Read a specific sub-item’s metadata
420 421 422 423 |
# File 'lib/metronome/api/item_access_api.rb', line 420 def (item_id, sub_item_id, opts = {}) data, _status_code, _headers = (item_id, sub_item_id, opts) data end |
#get_sub_item_metadata_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(SubItemMetadataResponse, Integer, Hash)>
Read a specific sub-item's metadata
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 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/metronome/api/item_access_api.rb', line 430 def (item_id, sub_item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.get_sub_item_metadata ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_sub_item_metadata" end # verify the required parameter 'sub_item_id' is set if @api_client.config.client_side_validation && sub_item_id.nil? fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.get_sub_item_metadata" end # resource path local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SubItemMetadataResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.get_sub_item_metadata", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#get_sub_item_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_sub_item_policies(item_id, sub_item_id, opts = {}) ⇒ ItemOrSubItemPolicyResponse
Read which policies have been applied to a specific sub-item
487 488 489 490 |
# File 'lib/metronome/api/item_access_api.rb', line 487 def get_sub_item_policies(item_id, sub_item_id, opts = {}) data, _status_code, _headers = get_sub_item_policies_with_http_info(item_id, sub_item_id, opts) data end |
#get_sub_item_policies_with_http_info(item_id, sub_item_id, opts = {}) ⇒ Array<(ItemOrSubItemPolicyResponse, Integer, Hash)>
Read which policies have been applied to a specific sub-item
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 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/metronome/api/item_access_api.rb', line 497 def get_sub_item_policies_with_http_info(item_id, sub_item_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemAccessApi.get_sub_item_policies ...' end # verify the required parameter 'item_id' is set if @api_client.config.client_side_validation && item_id.nil? fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_sub_item_policies" end # verify the required parameter 'sub_item_id' is set if @api_client.config.client_side_validation && sub_item_id.nil? fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.get_sub_item_policies" end # resource path local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}/policies'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ItemOrSubItemPolicyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"ItemAccessApi.get_sub_item_policies", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ItemAccessApi#get_sub_item_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |