class SwaggerClient::UsersApi
Attributes
Public Class Methods
# File lib/swagger_client/api/users_api.rb, line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Remove an allowed topic. @param app_id The app where the users belong to. @param id The user id. @param prefix The topic prefix. @param [Hash] opts the optional parameters @return [nil]
# File lib/swagger_client/api/users_api.rb, line 25 def users_delete_allowed_topic(app_id, id, prefix, opts = {}) users_delete_allowed_topic_with_http_info(app_id, id, prefix, opts) nil end
Remove an allowed topic. @param app_id The app where the users belong to. @param id The user id. @param prefix The topic prefix. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 36 def users_delete_allowed_topic_with_http_info(app_id, id, prefix, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_delete_allowed_topic ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_delete_allowed_topic" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_delete_allowed_topic" end # verify the required parameter 'prefix' is set if @api_client.config.client_side_validation && prefix.nil? fail ArgumentError, "Missing the required parameter 'prefix' when calling UsersApi.users_delete_allowed_topic" end # resource path local_var_path = '/api/apps/{appId}/users/{id}/allowed-topics/{prefix}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'prefix' + '}', prefix.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 = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_delete_allowed_topic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Remove a user subscriptions. @param app_id The app where the user belongs to. @param id The user id. @param prefix The topic prefix. @param [Hash] opts the optional parameters @return [nil]
# File lib/swagger_client/api/users_api.rb, line 91 def users_delete_subscription(app_id, id, prefix, opts = {}) users_delete_subscription_with_http_info(app_id, id, prefix, opts) nil end
Remove a user subscriptions. @param app_id The app where the user belongs to. @param id The user id. @param prefix The topic prefix. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 102 def users_delete_subscription_with_http_info(app_id, id, prefix, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_delete_subscription ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_delete_subscription" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_delete_subscription" end # verify the required parameter 'prefix' is set if @api_client.config.client_side_validation && prefix.nil? fail ArgumentError, "Missing the required parameter 'prefix' when calling UsersApi.users_delete_subscription" end # resource path local_var_path = '/api/apps/{appId}/users/{id}/subscriptions/{prefix}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'prefix' + '}', prefix.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 = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a user. @param app_id The app where the users belongs to. @param id The user id to delete. @param [Hash] opts the optional parameters @return [ListResponseDtoOfUserDto]
# File lib/swagger_client/api/users_api.rb, line 156 def users_delete_user(app_id, id, opts = {}) data, _status_code, _headers = users_delete_user_with_http_info(app_id, id, opts) data end
Delete a user. @param app_id The app where the users belongs to. @param id The user id to delete. @param [Hash] opts the optional parameters @return [Array<(ListResponseDtoOfUserDto
, Integer, Hash)>] ListResponseDtoOfUserDto
data, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 166 def users_delete_user_with_http_info(app_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_delete_user ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_delete_user" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_delete_user" end # resource path local_var_path = '/api/apps/{appId}/users/{id}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', 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[:body] return_type = opts[:return_type] || 'ListResponseDtoOfUserDto' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query user subscriptions. @param app_id The app where the user belongs to. @param id The user id. @param [Hash] opts the optional parameters @option opts [String] :query The optional query to search for items. @option opts [Integer] :take The number of items to return. @option opts [Integer] :skip The number of items to skip. @return [ListResponseDtoOfSubscriptionDto]
# File lib/swagger_client/api/users_api.rb, line 219 def users_get_subscriptions(app_id, id, opts = {}) data, _status_code, _headers = users_get_subscriptions_with_http_info(app_id, id, opts) data end
Query user subscriptions. @param app_id The app where the user belongs to. @param id The user id. @param [Hash] opts the optional parameters @option opts [String] :query The optional query to search for items. @option opts [Integer] :take The number of items to return. @option opts [Integer] :skip The number of items to skip. @return [Array<(ListResponseDtoOfSubscriptionDto
, Integer, Hash)>] ListResponseDtoOfSubscriptionDto
data, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 232 def users_get_subscriptions_with_http_info(app_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_get_subscriptions ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_get_subscriptions" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_get_subscriptions" end # resource path local_var_path = '/api/apps/{appId}/users/{id}/subscriptions'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].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 = opts[:return_type] || 'ListResponseDtoOfSubscriptionDto' auth_names = opts[:auth_names] || [] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_get_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a user. @param app_id The app where the user belongs to. @param id The user id. @param [Hash] opts the optional parameters @return [ListResponseDtoOfUserDto]
# File lib/swagger_client/api/users_api.rb, line 285 def users_get_user(app_id, id, opts = {}) data, _status_code, _headers = users_get_user_with_http_info(app_id, id, opts) data end
Get a user. @param app_id The app where the user belongs to. @param id The user id. @param [Hash] opts the optional parameters @return [Array<(ListResponseDtoOfUserDto
, Integer, Hash)>] ListResponseDtoOfUserDto
data, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 295 def users_get_user_with_http_info(app_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_get_user ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_get_user" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_get_user" end # resource path local_var_path = '/api/apps/{appId}/users/{id}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', 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[:body] return_type = opts[:return_type] || 'ListResponseDtoOfUserDto' auth_names = opts[:auth_names] || [] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query users. @param app_id The app where the users belongs to. @param [Hash] opts the optional parameters @option opts [String] :query The optional query to search for items. @option opts [Integer] :take The number of items to return. @option opts [Integer] :skip The number of items to skip. @return [ListResponseDtoOfUserDto]
# File lib/swagger_client/api/users_api.rb, line 347 def users_get_users(app_id, opts = {}) data, _status_code, _headers = users_get_users_with_http_info(app_id, opts) data end
Query users. @param app_id The app where the users belongs to. @param [Hash] opts the optional parameters @option opts [String] :query The optional query to search for items. @option opts [Integer] :take The number of items to return. @option opts [Integer] :skip The number of items to skip. @return [Array<(ListResponseDtoOfUserDto
, Integer, Hash)>] ListResponseDtoOfUserDto
data, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 359 def users_get_users_with_http_info(app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_get_users ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_get_users" end # resource path local_var_path = '/api/apps/{appId}/users'.sub('{' + 'appId' + '}', app_id.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].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 = opts[:return_type] || 'ListResponseDtoOfUserDto' auth_names = opts[:auth_names] || [] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add an allowed topic. @param body The upsert request. @param app_id The app where the users belong to. @param id The user id. @param [Hash] opts the optional parameters @return [nil]
# File lib/swagger_client/api/users_api.rb, line 409 def users_post_allowed_topic(body, app_id, id, opts = {}) users_post_allowed_topic_with_http_info(body, app_id, id, opts) nil end
Add an allowed topic. @param body The upsert request. @param app_id The app where the users belong to. @param id The user id. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 420 def users_post_allowed_topic_with_http_info(body, app_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_post_allowed_topic ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.users_post_allowed_topic" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_post_allowed_topic" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_post_allowed_topic" end # resource path local_var_path = '/api/apps/{appId}/users/{id}/allowed-topics'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_post_allowed_topic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Upsert a user subscriptions. @param body The subscription object. @param app_id The app where the user belongs to. @param id The user id. @param [Hash] opts the optional parameters @return [nil]
# File lib/swagger_client/api/users_api.rb, line 477 def users_post_subscription(body, app_id, id, opts = {}) users_post_subscription_with_http_info(body, app_id, id, opts) nil end
Upsert a user subscriptions. @param body The subscription object. @param app_id The app where the user belongs to. @param id The user id. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 488 def users_post_subscription_with_http_info(body, app_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_post_subscription ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.users_post_subscription" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_post_subscription" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_post_subscription" end # resource path local_var_path = '/api/apps/{appId}/users/{id}/subscriptions'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'id' + '}', 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_post_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Upsert users. @param body The upsert request. @param app_id The app where the users belong to. @param [Hash] opts the optional parameters @return [Array<UserDto>]
# File lib/swagger_client/api/users_api.rb, line 544 def users_post_users(body, app_id, opts = {}) data, _status_code, _headers = users_post_users_with_http_info(body, app_id, opts) data end
Upsert users. @param body The upsert request. @param app_id The app where the users belong to. @param [Hash] opts the optional parameters @return [Array<(Array<UserDto>, Integer, Hash)>] Array<UserDto> data, response status code and response headers
# File lib/swagger_client/api/users_api.rb, line 554 def users_post_users_with_http_info(body, app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.users_post_users ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.users_post_users" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_post_users" end # resource path local_var_path = '/api/apps/{appId}/users'.sub('{' + 'appId' + '}', app_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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'Array<UserDto>' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#users_post_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end