Class: PulpcoreClient::UsersApi
- Inherits:
-
Object
- Object
- PulpcoreClient::UsersApi
- Defined in:
- lib/pulpcore_client/api/users_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(user, opts = {}) ⇒ UserResponse
Create an user ViewSet for User.
-
#create_with_http_info(user, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Create an user ViewSet for User.
-
#delete(auth_user_href, opts = {}) ⇒ nil
Delete an user ViewSet for User.
-
#delete_with_http_info(auth_user_href, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an user ViewSet for User.
-
#initialize(api_client = ApiClient.default) ⇒ UsersApi
constructor
A new instance of UsersApi.
-
#list(opts = {}) ⇒ PaginatedUserResponseList
List users ViewSet for User.
-
#list_with_http_info(opts = {}) ⇒ Array<(PaginatedUserResponseList, Integer, Hash)>
List users ViewSet for User.
-
#partial_update(auth_user_href, patched_user, opts = {}) ⇒ UserResponse
Update an user ViewSet for User.
-
#partial_update_with_http_info(auth_user_href, patched_user, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Update an user ViewSet for User.
-
#permissions(auth_user_href, opts = {}) ⇒ PermissionResponse
List user permissions.
-
#permissions_with_http_info(auth_user_href, opts = {}) ⇒ Array<(PermissionResponse, Integer, Hash)>
List user permissions.
-
#read(auth_user_href, opts = {}) ⇒ UserResponse
Inspect an user ViewSet for User.
-
#read_with_http_info(auth_user_href, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Inspect an user ViewSet for User.
-
#update(auth_user_href, user, opts = {}) ⇒ UserResponse
Update an user ViewSet for User.
-
#update_with_http_info(auth_user_href, user, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Update an user ViewSet for User.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pulpcore_client/api/users_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create(user, opts = {}) ⇒ UserResponse
Create an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
27 28 29 30 |
# File 'lib/pulpcore_client/api/users_api.rb', line 27 def create(user, opts = {}) data, _status_code, _headers = create_with_http_info(user, opts) data end |
#create_with_http_info(user, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Create an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
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 82 83 84 |
# File 'lib/pulpcore_client/api/users_api.rb', line 37 def create_with_http_info(user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.create ...' end # verify the required parameter 'user' is set if @api_client.config.client_side_validation && user.nil? fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.create" end # resource path local_var_path = '/pulp/api/v3/users/' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(user) # return_type return_type = opts[:return_type] || 'UserResponse' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete(auth_user_href, opts = {}) ⇒ nil
Delete an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
91 92 93 94 |
# File 'lib/pulpcore_client/api/users_api.rb', line 91 def delete(auth_user_href, opts = {}) delete_with_http_info(auth_user_href, opts) nil end |
#delete_with_http_info(auth_user_href, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
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/pulpcore_client/api/users_api.rb', line 101 def delete_with_http_info(auth_user_href, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.delete ...' end # verify the required parameter 'auth_user_href' is set if @api_client.config.client_side_validation && auth_user_href.nil? fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.delete" end # resource path local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list(opts = {}) ⇒ PaginatedUserResponseList
List users ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
177 178 179 180 |
# File 'lib/pulpcore_client/api/users_api.rb', line 177 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end |
#list_with_http_info(opts = {}) ⇒ Array<(PaginatedUserResponseList, Integer, Hash)>
List users ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
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 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 |
# File 'lib/pulpcore_client/api/users_api.rb', line 213 def list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.list ...' end # resource path local_var_path = '/pulp/api/v3/users/' # query parameters query_params = opts[:query_params] || {} query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'email__contains'] = opts[:'email__contains'] if !opts[:'email__contains'].nil? query_params[:'email__icontains'] = opts[:'email__icontains'] if !opts[:'email__icontains'].nil? query_params[:'email__iexact'] = opts[:'email__iexact'] if !opts[:'email__iexact'].nil? query_params[:'email__in'] = @api_client.build_collection_param(opts[:'email__in'], :csv) if !opts[:'email__in'].nil? query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil? query_params[:'first_name__contains'] = opts[:'first_name__contains'] if !opts[:'first_name__contains'].nil? query_params[:'first_name__icontains'] = opts[:'first_name__icontains'] if !opts[:'first_name__icontains'].nil? query_params[:'first_name__iexact'] = opts[:'first_name__iexact'] if !opts[:'first_name__iexact'].nil? query_params[:'first_name__in'] = @api_client.build_collection_param(opts[:'first_name__in'], :csv) if !opts[:'first_name__in'].nil? query_params[:'is_active'] = opts[:'is_active'] if !opts[:'is_active'].nil? query_params[:'is_staff'] = opts[:'is_staff'] if !opts[:'is_staff'].nil? query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil? query_params[:'last_name__contains'] = opts[:'last_name__contains'] if !opts[:'last_name__contains'].nil? query_params[:'last_name__icontains'] = opts[:'last_name__icontains'] if !opts[:'last_name__icontains'].nil? query_params[:'last_name__iexact'] = opts[:'last_name__iexact'] if !opts[:'last_name__iexact'].nil? query_params[:'last_name__in'] = @api_client.build_collection_param(opts[:'last_name__in'], :csv) if !opts[:'last_name__in'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil? query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil? query_params[:'username__contains'] = opts[:'username__contains'] if !opts[:'username__contains'].nil? query_params[:'username__icontains'] = opts[:'username__icontains'] if !opts[:'username__icontains'].nil? query_params[:'username__iexact'] = opts[:'username__iexact'] if !opts[:'username__iexact'].nil? query_params[:'username__in'] = @api_client.build_collection_param(opts[:'username__in'], :csv) if !opts[:'username__in'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].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] || 'PaginatedUserResponseList' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#partial_update(auth_user_href, patched_user, opts = {}) ⇒ UserResponse
Update an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
289 290 291 292 |
# File 'lib/pulpcore_client/api/users_api.rb', line 289 def partial_update(auth_user_href, patched_user, opts = {}) data, _status_code, _headers = partial_update_with_http_info(auth_user_href, patched_user, opts) data end |
#partial_update_with_http_info(auth_user_href, patched_user, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Update an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
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 347 348 349 350 351 |
# File 'lib/pulpcore_client/api/users_api.rb', line 300 def partial_update_with_http_info(auth_user_href, patched_user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.partial_update ...' end # verify the required parameter 'auth_user_href' is set if @api_client.config.client_side_validation && auth_user_href.nil? fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.partial_update" end # verify the required parameter 'patched_user' is set if @api_client.config.client_side_validation && patched_user.nil? fail ArgumentError, "Missing the required parameter 'patched_user' when calling UsersApi.partial_update" end # resource path local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(patched_user) # return_type return_type = opts[:return_type] || 'UserResponse' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#permissions(auth_user_href, opts = {}) ⇒ PermissionResponse
List user permissions.
359 360 361 362 |
# File 'lib/pulpcore_client/api/users_api.rb', line 359 def (auth_user_href, opts = {}) data, _status_code, _headers = (auth_user_href, opts) data end |
#permissions_with_http_info(auth_user_href, opts = {}) ⇒ Array<(PermissionResponse, Integer, Hash)>
List user permissions.
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 414 415 416 417 |
# File 'lib/pulpcore_client/api/users_api.rb', line 370 def (auth_user_href, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.permissions ...' end # verify the required parameter 'auth_user_href' is set if @api_client.config.client_side_validation && auth_user_href.nil? fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.permissions" end # resource path local_var_path = '{auth_user_href}permissions/'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].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] || 'PermissionResponse' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read(auth_user_href, opts = {}) ⇒ UserResponse
Inspect an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
426 427 428 429 |
# File 'lib/pulpcore_client/api/users_api.rb', line 426 def read(auth_user_href, opts = {}) data, _status_code, _headers = read_with_http_info(auth_user_href, opts) data end |
#read_with_http_info(auth_user_href, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Inspect an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
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 481 482 483 484 485 |
# File 'lib/pulpcore_client/api/users_api.rb', line 438 def read_with_http_info(auth_user_href, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.read ...' end # verify the required parameter 'auth_user_href' is set if @api_client.config.client_side_validation && auth_user_href.nil? fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.read" end # resource path local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].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] || 'UserResponse' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update(auth_user_href, user, opts = {}) ⇒ UserResponse
Update an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
493 494 495 496 |
# File 'lib/pulpcore_client/api/users_api.rb', line 493 def update(auth_user_href, user, opts = {}) data, _status_code, _headers = update_with_http_info(auth_user_href, user, opts) data end |
#update_with_http_info(auth_user_href, user, opts = {}) ⇒ Array<(UserResponse, Integer, Hash)>
Update an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change
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 548 549 550 551 552 553 554 555 |
# File 'lib/pulpcore_client/api/users_api.rb', line 504 def update_with_http_info(auth_user_href, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.update ...' end # verify the required parameter 'auth_user_href' is set if @api_client.config.client_side_validation && auth_user_href.nil? fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.update" end # verify the required parameter 'user' is set if @api_client.config.client_side_validation && user.nil? fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.update" end # resource path local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(user) # return_type return_type = opts[:return_type] || 'UserResponse' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] = 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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |