class PulpcoreClient::UsersApi
Attributes
Public Class Methods
# File lib/pulpcore_client/api/users_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
List users ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change @param [Hash] opts the optional parameters @option opts [Integer] :limit Number of results to return per page. @option opts [Integer] :offset The initial index from which to return the results. @option opts [String] :ordering Which field to use when ordering the results. @option opts [String] :fields A list of fields to include in the response. @option opts [String] :exclude_fields A list of fields to exclude from the response. @return [InlineResponse20013]
# File lib/pulpcore_client/api/users_api.rb, line 31 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end
List users ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change @param [Hash] opts the optional parameters @option opts [Integer] :limit Number of results to return per page. @option opts [Integer] :offset The initial index from which to return the results. @option opts [String] :ordering Which field to use when ordering the results. @option opts [String] :fields A list of fields to include in the response. @option opts [String] :exclude_fields A list of fields to exclude from the response. @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers
# File lib/pulpcore_client/api/users_api.rb, line 45 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[:'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[:'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] || 'InlineResponse20013' # auth_names auth_names = opts[:auth_names] || ['basicAuth'] 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: UsersApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List user permissions. @param auth_user_href [String] @param [Hash] opts the optional parameters @option opts [String] :fields A list of fields to include in the response. @option opts [String] :exclude_fields A list of fields to exclude from the response. @return [PermissionResponse]
# File lib/pulpcore_client/api/users_api.rb, line 99 def permissions(auth_user_href, opts = {}) data, _status_code, _headers = permissions_with_http_info(auth_user_href, opts) data end
List user permissions. @param auth_user_href [String] @param [Hash] opts the optional parameters @option opts [String] :fields A list of fields to include in the response. @option opts [String] :exclude_fields A list of fields to exclude from the response. @return [Array<(PermissionResponse, Integer, Hash)>] PermissionResponse data, response status code and response headers
# File lib/pulpcore_client/api/users_api.rb, line 110 def permissions_with_http_info(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'] 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: UsersApi#permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Inspect an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change @param auth_user_href [String] @param [Hash] opts the optional parameters @option opts [String] :fields A list of fields to include in the response. @option opts [String] :exclude_fields A list of fields to exclude from the response. @return [UserResponse]
# File lib/pulpcore_client/api/users_api.rb, line 166 def read(auth_user_href, opts = {}) data, _status_code, _headers = read_with_http_info(auth_user_href, opts) data end
Inspect an user ViewSet for User. NOTE: This API endpoint is in "tech preview" and subject to change @param auth_user_href [String] @param [Hash] opts the optional parameters @option opts [String] :fields A list of fields to include in the response. @option opts [String] :exclude_fields A list of fields to exclude from the response. @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
# File lib/pulpcore_client/api/users_api.rb, line 178 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'] 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: UsersApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end