Module: KewegoParty::Client::Channel

Included in:
KewegoParty::Client
Defined in:
lib/kewego_party/client/channel.rb

Instance Method Summary collapse

Instance Method Details

#channel_get_details(csig, options = {}) ⇒ Object



11
12
13
14
15
# File 'lib/kewego_party/client/channel.rb', line 11

def channel_get_details(csig, options = {})
  options = {:csig => csig, :appToken  => app_token}.merge options
  response = get('/channel/getDetails/', options)
  process_response(response, [:channel])
end

#channel_get_player_code(csig, language_code = "es", options = {}) ⇒ String

Allows you to get the embedded code of a channel from the channel identifier (CSIG).

Examples:

get the embedded code of a channel from the channel identifier (csig)

KewegoParty.get_player_code("some_csig_identifier")

Parameters:

  • csig (String)

    A Kewego channel Identifier.

  • language_code (String) (defaults to: "es")

    (‘es’) Language of the player

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :player_key (String)
  • :skin_key (String)
  • :autostart (Boolean)
  • :advertise (String)
  • :width (Integer) — default: 400
  • :height (Integer) — default: 300

Returns:

  • (String)

    A Player embedded code

See Also:



48
49
50
51
52
53
54
# File 'lib/kewego_party/client/channel.rb', line 48

def channel_get_player_code(csig, language_code = "es", options = {})
  default_options = {:csig => csig, :appToken => app_token, :language_code => language_code}
  options = default_options.merge options

  response = get('/channel/getPlayerCode/', options)
  process_response(response, [:blog])
end

#channel_get_thumbnail(csig, options = {}) ⇒ String

Thumbnail for a video

Examples:

receive a thumbnail from those available in the channel (csig)

KewegoParty.get_thumbnail("some_csig_identifier")

Parameters:

  • csig (String)

    A Kewego channel Identifier.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :size (String) — default: normal

    Size of the thumbnail - Possible values: small/normal/large

  • :pos (Integer) — default: 1

    Position of the video in the channel

  • :index (Integer) — default: 1

    index of the thumbnail - Possible values: 1/2/3

Returns:

  • (String)

    A thumbnail

See Also:



28
29
30
31
# File 'lib/kewego_party/client/channel.rb', line 28

def channel_get_thumbnail(csig, options = {})
  options = {:csig => csig, :appToken  => app_token}.merge options
  get("/channel/getThumbnail/", options)
end

#channel_get_videos(csig, options = {}) ⇒ Object



5
6
7
8
9
# File 'lib/kewego_party/client/channel.rb', line 5

def channel_get_videos(csig, options = {})
  options = {:csig => csig, :appToken  => app_token}.merge options
  response = get('/channel/getVideos/', options)
  process_response(response, [])
end