class RadioManagerClient::TagApi
Attributes
Public Class Methods
# File lib/radiomanager_client/api/tag_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create tag. Create tag. @param data Data
**(Required)** @param [Hash] opts the optional parameters @return [PostSuccess]
# File lib/radiomanager_client/api/tag_api.rb, line 28 def create_tag(data, opts = {}) data, _status_code, _headers = create_tag_with_http_info(data, opts) return data end
Create tag. Create tag. @param data Data
**(Required)** @param [Hash] opts the optional parameters @return [Array<(PostSuccess
, Fixnum, Hash)>] PostSuccess
data, response status code and response headers
# File lib/radiomanager_client/api/tag_api.rb, line 38 def create_tag_with_http_info(data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagApi.create_tag ..." end # verify the required parameter 'data' is set if @api_client.config.client_side_validation && data.nil? fail ArgumentError, "Missing the required parameter 'data' when calling TagApi.create_tag" end # resource path local_var_path = "/tags" # query parameters query_params = {} # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(data) auth_names = ['API Key'] 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 => 'PostSuccess') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApi#create_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete tag by id Delete tag by id @param id ID of Tag
**(Required)** @param [Hash] opts the optional parameters @return [Success]
# File lib/radiomanager_client/api/tag_api.rb, line 83 def delete_tag_by_id(id, opts = {}) data, _status_code, _headers = delete_tag_by_id_with_http_info(id, opts) return data end
Delete tag by id Delete tag by id @param id ID of Tag
**(Required)** @param [Hash] opts the optional parameters @return [Array<(Success
, Fixnum, Hash)>] Success
data, response status code and response headers
# File lib/radiomanager_client/api/tag_api.rb, line 93 def delete_tag_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagApi.delete_tag_by_id ..." 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 TagApi.delete_tag_by_id" end if @api_client.config.client_side_validation && id < 0 fail ArgumentError, 'invalid value for "id" when calling TagApi.delete_tag_by_id, must be greater than or equal to 0.' end # resource path local_var_path = "/tags/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['API Key'] 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 => 'Success') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApi#delete_tag_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get tags by id Get tags by id @param id ID of Tag
**(Required)** @param [Hash] opts the optional parameters @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)* @return [TagResult]
# File lib/radiomanager_client/api/tag_api.rb, line 143 def get_tag_by_id(id, opts = {}) data, _status_code, _headers = get_tag_by_id_with_http_info(id, opts) return data end
Get tags by id Get tags by id @param id ID of Tag
**(Required)** @param [Hash] opts the optional parameters @option opts [Integer] :_external_station_id Query on a different (content providing) station *(Optional)* @return [Array<(TagResult
, Fixnum, Hash)>] TagResult
data, response status code and response headers
# File lib/radiomanager_client/api/tag_api.rb, line 154 def get_tag_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagApi.get_tag_by_id ..." 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 TagApi.get_tag_by_id" end if @api_client.config.client_side_validation && id < 0 fail ArgumentError, 'invalid value for "id" when calling TagApi.get_tag_by_id, must be greater than or equal to 0.' end # resource path local_var_path = "/tags/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'_external_station_id'] = opts[:'_external_station_id'] if !opts[:'_external_station_id'].nil? # header parameters 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 = {} # http body (model) post_body = nil auth_names = ['API Key'] 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 => 'TagResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApi#get_tag_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update tag by id Update tag by id @param id ID of Tag
**(Required)** @param [Hash] opts the optional parameters @option opts [TagDataInput] :data Data
*(Optional)* @return [Success]
# File lib/radiomanager_client/api/tag_api.rb, line 296 def update_tag_by_id(id, opts = {}) data, _status_code, _headers = update_tag_by_id_with_http_info(id, opts) return data end
Update tag by id Update tag by id @param id ID of Tag
**(Required)** @param [Hash] opts the optional parameters @option opts [TagDataInput] :data Data
*(Optional)* @return [Array<(Success
, Fixnum, Hash)>] Success
data, response status code and response headers
# File lib/radiomanager_client/api/tag_api.rb, line 307 def update_tag_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagApi.update_tag_by_id ..." 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 TagApi.update_tag_by_id" end if @api_client.config.client_side_validation && id < 0 fail ArgumentError, 'invalid value for "id" when calling TagApi.update_tag_by_id, must be greater than or equal to 0.' end # resource path local_var_path = "/tags/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'data']) auth_names = ['API Key'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Success') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApi#update_tag_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end