Class: Episodic::Platform::EpisodeItem
- Defined in:
- lib/episodic/platform/query_methods.rb
Overview
Represents a episode from a list of episodes returned from a call to Episodic::Platform::QueryMethods.episodes
.
Instance Method Summary collapse
-
#custom_fields ⇒ Object
Gets the list of custom fields for this item.
-
#date_fields ⇒ Object
Provides a list of fields that are actually dates.
-
#downloads ⇒ Object
Gets the list of downloads for this item.
-
#playlists ⇒ Object
Gets the list of playlists for this item.
Methods inherited from Item
#exists?, #id, #initialize, #method_missing, #players, #respond_to?, #thumbnails
Constructor Details
This class inherits a constructor from Episodic::Platform::Item
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Episodic::Platform::Item
Instance Method Details
#custom_fields ⇒ Object
Gets the list of custom fields for this item.
Returns
- Array
-
An array of
Episodic::Platform::CustomItem
objects.
494 495 496 497 |
# File 'lib/episodic/platform/query_methods.rb', line 494 def custom_fields @custom_fields ||= nested_items("custom_fields", "field", CustomFieldItem) return @custom_fields end |
#date_fields ⇒ Object
Provides a list of fields that are actually dates.
Returns
- Array
-
A list of field names as symbols.
518 519 520 |
# File 'lib/episodic/platform/query_methods.rb', line 518 def date_fields return [:air_date, :off_air_date] end |
#downloads ⇒ Object
Gets the list of downloads for this item.
Returns
- Array
-
An array of
Episodic::Platform::DownloadItem
objects.
482 483 484 485 |
# File 'lib/episodic/platform/query_methods.rb', line 482 def downloads @downloads ||= nested_items("downloads", "download", DownloadItem) return @downloads end |
#playlists ⇒ Object
Gets the list of playlists for this item.
Returns
- Array
-
An array of
Episodic::Platform::EpisodePlaylistItem
objects.
506 507 508 509 |
# File 'lib/episodic/platform/query_methods.rb', line 506 def playlists @playlists ||= nested_items("playlists", "playlist", EpisodePlaylistItem) return @playlists end |