Class: MovieAPI
- Inherits:
-
Object
- Object
- MovieAPI
- Defined in:
- lib/mmapi.rb
Constant Summary collapse
- API_URL =
'http://mymovieapi.com/'
Class Method Summary collapse
-
.search_by_id(id, options = {}) ⇒ Hash
Queries the API for an IMDB ID.
-
.search_by_title(title, options = {}) ⇒ Array
Queries the API for a movie title.
Class Method Details
.search_by_id(id, options = {}) ⇒ Hash
TODO:
fill out these docs
Queries the API for an IMDB ID
16 17 18 |
# File 'lib/mmapi.rb', line 16 def self.search_by_id(id, = {}) return self.request("#{API_URL}?id=#{URI::encode(id)}" + self.parameterize()) end |
.search_by_title(title, options = {}) ⇒ Array
Queries the API for a movie title
39 40 41 |
# File 'lib/mmapi.rb', line 39 def self.search_by_title(title, = {}) return self.request("#{API_URL}?q=#{URI::encode(title)}" + self.parameterize()) end |