Class: Rovi::Api
Direct Known Subclasses
Instance Method Summary collapse
- #get(category, method, params = {}) ⇒ Object
-
#initialize(api_key, api_secret) ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(api_key, api_secret) ⇒ Api
Returns a new instance of Api.
11 12 13 14 15 |
# File 'lib/rovi/api.rb', line 11 def initialize(api_key, api_secret) @api_key, @api_secret = api_key, api_secret @version = "v1" @service_name = "data" end |
Instance Method Details
#get(category, method, params = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rovi/api.rb', line 17 def get(category, method, params = {}) params.merge!(required_params) = self.class..dup.merge!({ query: params }) path = build_path(category, method) response = self.class.get(path, ) response.parsed_response end |