Class: ReedSdk::TheOneApiApi
- Inherits:
-
Object
- Object
- ReedSdk::TheOneApiApi
- Defined in:
- lib/reed_sdk/api/the_one_api_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ TheOneApiApi
constructor
A new instance of TheOneApiApi.
-
#retrieve_movie(id, opts = {}) ⇒ Movie
Retrieve a movie by a specific ID Retrieves a specific movie by ID or returns an empty response.
-
#retrieve_movie_quotes(id, opts = {}) ⇒ Quotes
Retrieve a specific movies quotes.
-
#retrieve_movie_quotes_with_http_info(id, opts = {}) ⇒ Array<(Quotes, Integer, Hash)>
Retrieve a specific movies quotes.
-
#retrieve_movie_with_http_info(id, opts = {}) ⇒ Array<(Movie, Integer, Hash)>
Retrieve a movie by a specific ID Retrieves a specific movie by ID or returns an empty response.
-
#retrieve_movies(opts = {}) ⇒ Movies
Retrieve all movies Retrieves all movies in the database.
-
#retrieve_movies_with_http_info(opts = {}) ⇒ Array<(Movies, Integer, Hash)>
Retrieve all movies Retrieves all movies in the database.
-
#retrieve_quote(id, opts = {}) ⇒ Quote
Retrieve a specific movie quote Retrieves a specific quote by ID or returns an empty response.
-
#retrieve_quote_with_http_info(id, opts = {}) ⇒ Array<(Quote, Integer, Hash)>
Retrieve a specific movie quote Retrieves a specific quote by ID or returns an empty response.
-
#retrieve_quotes(opts = {}) ⇒ Quotes
Retrieve all movie quotes Retrieves a list of all movie quotes.
-
#retrieve_quotes_with_http_info(opts = {}) ⇒ Array<(Quotes, Integer, Hash)>
Retrieve all movie quotes Retrieves a list of all movie quotes.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TheOneApiApi
Returns a new instance of TheOneApiApi.
19 20 21 |
# File 'lib/reed_sdk/api/the_one_api_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/reed_sdk/api/the_one_api_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#retrieve_movie(id, opts = {}) ⇒ Movie
Retrieve a movie by a specific ID Retrieves a specific movie by ID or returns an empty response.
27 28 29 30 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 27 def retrieve_movie(id, opts = {}) data, _status_code, _headers = retrieve_movie_with_http_info(id, opts) data end |
#retrieve_movie_quotes(id, opts = {}) ⇒ Quotes
Retrieve a specific movies quotes. Retrieve a sepcific movie’s quotes or return an empty response.
94 95 96 97 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 94 def retrieve_movie_quotes(id, opts = {}) data, _status_code, _headers = retrieve_movie_quotes_with_http_info(id, opts) data end |
#retrieve_movie_quotes_with_http_info(id, opts = {}) ⇒ Array<(Quotes, Integer, Hash)>
Retrieve a specific movies quotes. Retrieve a sepcific movie's quotes or return an empty response.
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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 108 def retrieve_movie_quotes_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TheOneApiApi.retrieve_movie_quotes ...' 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 TheOneApiApi.retrieve_movie_quotes" end # resource path local_var_path = '/movie/{id}/quote'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Quotes' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TheOneApiApi.retrieve_movie_quotes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TheOneApiApi#retrieve_movie_quotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_movie_with_http_info(id, opts = {}) ⇒ Array<(Movie, Integer, Hash)>
Retrieve a movie by a specific ID Retrieves a specific movie by ID or returns an empty response.
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 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 37 def retrieve_movie_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TheOneApiApi.retrieve_movie ...' 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 TheOneApiApi.retrieve_movie" end # resource path local_var_path = '/movie/{id}'.sub('{' + 'id' + '}', CGI.escape(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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Movie' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TheOneApiApi.retrieve_movie", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TheOneApiApi#retrieve_movie\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_movies(opts = {}) ⇒ Movies
Retrieve all movies Retrieves all movies in the database.
168 169 170 171 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 168 def retrieve_movies(opts = {}) data, _status_code, _headers = retrieve_movies_with_http_info(opts) data end |
#retrieve_movies_with_http_info(opts = {}) ⇒ Array<(Movies, Integer, Hash)>
Retrieve all movies Retrieves all movies in the database.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 181 def retrieve_movies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TheOneApiApi.retrieve_movies ...' end # resource path local_var_path = '/movie' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Movies' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TheOneApiApi.retrieve_movies", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TheOneApiApi#retrieve_movies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_quote(id, opts = {}) ⇒ Quote
Retrieve a specific movie quote Retrieves a specific quote by ID or returns an empty response.
234 235 236 237 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 234 def retrieve_quote(id, opts = {}) data, _status_code, _headers = retrieve_quote_with_http_info(id, opts) data end |
#retrieve_quote_with_http_info(id, opts = {}) ⇒ Array<(Quote, Integer, Hash)>
Retrieve a specific movie quote Retrieves a specific quote by ID or returns an empty response.
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 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 244 def retrieve_quote_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TheOneApiApi.retrieve_quote ...' 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 TheOneApiApi.retrieve_quote" end # resource path local_var_path = '/quote/{id}'.sub('{' + 'id' + '}', CGI.escape(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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Quote' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TheOneApiApi.retrieve_quote", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TheOneApiApi#retrieve_quote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#retrieve_quotes(opts = {}) ⇒ Quotes
Retrieve all movie quotes Retrieves a list of all movie quotes
300 301 302 303 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 300 def retrieve_quotes(opts = {}) data, _status_code, _headers = retrieve_quotes_with_http_info(opts) data end |
#retrieve_quotes_with_http_info(opts = {}) ⇒ Array<(Quotes, Integer, Hash)>
Retrieve all movie quotes Retrieves a list of all movie quotes
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/reed_sdk/api/the_one_api_api.rb', line 313 def retrieve_quotes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TheOneApiApi.retrieve_quotes ...' end # resource path local_var_path = '/quote' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Quotes' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TheOneApiApi.retrieve_quotes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TheOneApiApi#retrieve_quotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |