class SamplifyAPIClient::UsersApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/samplify_api_client/api/users_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

users_get_user_info(opts = {}) click to toggle source

getUserInfo users @param [Hash] opts the optional parameters @option opts [Integer] :app_id Only return apps with the given id @option opts [BOOLEAN] :current Only return current app for the user id @option opts [BOOLEAN] :default Only return default app for the user id @option opts [String] :name Only return apps with the given name @return [UserInfo]

# File lib/samplify_api_client/api/users_api.rb, line 29
def users_get_user_info(opts = {})
  data, _status_code, _headers = users_get_user_info_with_http_info(opts)
  data
end
users_get_user_info_with_http_info(opts = {}) click to toggle source

getUserInfo users @param [Hash] opts the optional parameters @option opts [Integer] :app_id Only return apps with the given id @option opts [BOOLEAN] :current Only return current app for the user id @option opts [BOOLEAN] :default Only return default app for the user id @option opts [String] :name Only return apps with the given name @return [Array<(UserInfo, Fixnum, Hash)>] UserInfo data, response status code and response headers

# File lib/samplify_api_client/api/users_api.rb, line 41
def users_get_user_info_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UsersApi.users_get_user_info ...'
  end
  # resource path
  local_var_path = '/sample/v1/users/info'

  # query parameters
  query_params = {}
  query_params[:'appId'] = opts[:'app_id'] if !opts[:'app_id'].nil?
  query_params[:'current'] = opts[:'current'] if !opts[:'current'].nil?
  query_params[:'default'] = opts[:'default'] if !opts[:'default'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.userinfo+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['jwt']
  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 => 'UserInfo')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#users_get_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end