Module: ESPN::Client::Video

Included in:
ESPN::Client
Defined in:
lib/espn/client/video.rb

Overview

Public: The mapping to the VIDEO API of the ESPN developer API.

Examples

class Client
  include ESPN::Client::Video
end

Instance Method Summary collapse

Instance Method Details

#videos(channel_id, opts = {}) ⇒ Object

Public: Get video clip and channel information from ESPN.

channel_id - The id of a video channel. opts - Hash options used to refine the selection (default: {}).

:clip_id - The id of the clip (default: nil).

Returns an Array of Hashie::Mash.



20
21
22
23
# File 'lib/espn/client/video.rb', line 20

def videos(channel_id, opts={})
  pattern = "video/channels/#{channel_id}/clips/:clip_id"
  get(pattern, opts).channels
end