Class: RadioManagerClient::TagApi
- Inherits:
-
Object
- Object
- RadioManagerClient::TagApi
- Defined in:
- lib/radiomanager_client/api/tag_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_tag(data, opts = {}) ⇒ PostSuccess
Create tag.
-
#create_tag_with_http_info(data, opts = {}) ⇒ Array<(PostSuccess, Fixnum, Hash)>
Create tag.
-
#delete_tag_by_id(id, opts = {}) ⇒ Success
Delete tag by id Delete tag by id.
-
#delete_tag_by_id_with_http_info(id, opts = {}) ⇒ Array<(Success, Fixnum, Hash)>
Delete tag by id Delete tag by id.
-
#get_tag_by_id(id, opts = {}) ⇒ TagResult
Get tags by id Get tags by id.
-
#get_tag_by_id_with_http_info(id, opts = {}) ⇒ Array<(TagResult, Fixnum, Hash)>
Get tags by id Get tags by id.
-
#initialize(api_client = ApiClient.default) ⇒ TagApi
constructor
A new instance of TagApi.
-
#list_tags(opts = {}) ⇒ TagResults
Get a list of all the tags currently in your station.
-
#list_tags_with_http_info(opts = {}) ⇒ Array<(TagResults, Fixnum, Hash)>
Get a list of all the tags currently in your station.
-
#update_tag_by_id(id, opts = {}) ⇒ Success
Update tag by id Update tag by id.
-
#update_tag_by_id_with_http_info(id, opts = {}) ⇒ Array<(Success, Fixnum, Hash)>
Update tag by id Update tag by id.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TagApi
Returns a new instance of TagApi.
19 20 21 |
# File 'lib/radiomanager_client/api/tag_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/radiomanager_client/api/tag_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_tag(data, opts = {}) ⇒ PostSuccess
Create tag. Create tag.
28 29 30 31 |
# 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_with_http_info(data, opts = {}) ⇒ Array<(PostSuccess, Fixnum, Hash)>
Create tag. Create tag.
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 |
# 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(id, opts = {}) ⇒ Success
Delete tag by id Delete tag by id
83 84 85 86 |
# 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_with_http_info(id, opts = {}) ⇒ Array<(Success, Fixnum, Hash)>
Delete tag by id Delete tag by id
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# 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_tag_by_id(id, opts = {}) ⇒ TagResult
Get tags by id Get tags by id
143 144 145 146 |
# 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_tag_by_id_with_http_info(id, opts = {}) ⇒ Array<(TagResult, Fixnum, Hash)>
Get tags by id Get tags by id
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# 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 |
#list_tags(opts = {}) ⇒ TagResults
Get a list of all the tags currently in your station. Get a list of all the tags currently in your station. This feature supports pagination and will give a maximum results of 50 tags back.
209 210 211 212 |
# File 'lib/radiomanager_client/api/tag_api.rb', line 209 def (opts = {}) data, _status_code, _headers = (opts) return data end |
#list_tags_with_http_info(opts = {}) ⇒ Array<(TagResults, Fixnum, Hash)>
Get a list of all the tags currently in your station. Get a list of all the tags currently in your station. This feature supports pagination and will give a maximum results of 50 tags back.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/radiomanager_client/api/tag_api.rb', line 224 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TagApi.list_tags ..." end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling TagApi.list_tags, must be greater than or equal to 1.' end # resource path local_var_path = "/tags" # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'program_id'] = opts[:'program_id'] if !opts[:'program_id'].nil? query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil? query_params[:'broadcast_id'] = opts[:'broadcast_id'] if !opts[:'broadcast_id'].nil? query_params[:'contact_id'] = opts[:'contact_id'] if !opts[:'contact_id'].nil? 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 => 'TagResults') if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApi#list_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_tag_by_id(id, opts = {}) ⇒ Success
Update tag by id Update tag by id
276 277 278 279 |
# File 'lib/radiomanager_client/api/tag_api.rb', line 276 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_with_http_info(id, opts = {}) ⇒ Array<(Success, Fixnum, Hash)>
Update tag by id Update tag by id
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/radiomanager_client/api/tag_api.rb', line 287 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 |