Class: Episodic::Platform::PlaylistItem

Inherits:
Item
  • Object
show all
Defined in:
lib/episodic/platform/query_methods.rb

Overview

Represents a playlist from a list of playlists returned from a call to Episodic::Platform::QueryMethods.playlists.

Instance Method Summary collapse

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_fieldsObject

Gets the list of custom fields for this item.

Returns

Array

An array of Episodic::Platform::CustomItem objects.



536
537
538
539
# File 'lib/episodic/platform/query_methods.rb', line 536

def custom_fields
  @custom_fields ||= nested_items("custom_fields", "field", CustomFieldItem)
  return @custom_fields
end

#date_fieldsObject

Provides a list of fields that are actually dates.

Returns

Array

A list of field names as symbols.



560
561
562
# File 'lib/episodic/platform/query_methods.rb', line 560

def date_fields
  return [:created_at]
end

#episodesObject

Gets the list of episodes for this item.

Returns

Array

An array of Episodic::Platform::PlaylistEpisodeItem objects.



548
549
550
551
# File 'lib/episodic/platform/query_methods.rb', line 548

def episodes
  @episodes ||= nested_items("episodes", "episode", PlaylistEpisodeItem)
  return @episodes
end