Class: Hooloo::Show
- Inherits:
-
MozartHash
- Object
- MozartHash
- Hooloo::Show
- Defined in:
- lib/hooloo/show.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id) ⇒ Show
constructor
A new instance of Show.
- #videos(season = 1, args = {}) ⇒ Object
Methods inherited from MozartHash
bool, cast, date, field_mapping, float, #inspect, #method_missing, #respond_to?, uri
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Hooloo::MozartHash
Class Method Details
.popular_today(args = {}) ⇒ Object
2 3 4 5 6 |
# File 'lib/hooloo/show.rb', line 2 def self.popular_today(args={}) Hooloo.paginated_request('shows', { sort: 'popular_today' }.merge(args), 30) { |g, x| g << Hooloo::Show.new(x['show']) } end |
Instance Method Details
#videos(season = 1, args = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/hooloo/show.rb', line 15 def videos(season=1, args={}) Hooloo.paginated_request("shows/#{id}/episodes", { season_number: season }.merge(args), 30) { |g, x| g << Hooloo::Video.new(x['video']) } end |