Method: Notifo::UsersApi#users_delete_allowed_topic_with_http_info

Defined in:
lib/notifo/api/users_api.rb

#users_delete_allowed_topic_with_http_info(app_id, id, prefix, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove an allowed topic.

Parameters:

  • app_id

    The app where the users belong to.

  • id

    The user ID.

  • prefix

    The topic prefix.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
82
83
84
# File 'lib/notifo/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