Class: Animoto::Postroll::CustomFootage

Inherits:
Animoto::Postroll show all
Defined in:
lib/animoto/postrolls/custom_footage.rb

Constant Summary

Constants inherited from Animoto::Postroll

POWERED_BY_ANIMOTO, WHITE_LABEL

Instance Attribute Summary collapse

Attributes inherited from Animoto::Postroll

#template

Instance Method Summary collapse

Methods inherited from Animoto::Postroll

new

Constructor Details

#initialize(source_url) ⇒ Animoto::Postroll::CustomFootage

Creates a new postroll with custom footage at the supplied URL.

Parameters:

  • source_url (String)

    a url to a video file to be inserted into this custom postroll template



17
18
19
20
# File 'lib/animoto/postrolls/custom_footage.rb', line 17

def initialize source_url
  super("custom_footage")
  @source_url = source_url
end

Instance Attribute Details

#durationString

The URL to a video to insert into this custom footage postroll.

Returns:

  • (String)


9
10
11
# File 'lib/animoto/postrolls/custom_footage.rb', line 9

def duration
  @duration
end

#source_urlString

The URL to a video to insert into this custom footage postroll.

Returns:

  • (String)


9
10
11
# File 'lib/animoto/postrolls/custom_footage.rb', line 9

def source_url
  @source_url
end

#start_timeString

The URL to a video to insert into this custom footage postroll.

Returns:

  • (String)


9
10
11
# File 'lib/animoto/postrolls/custom_footage.rb', line 9

def start_time
  @start_time
end

Instance Method Details

#to_hashHash{String=>Object}

Returns a representation of this postroll as a hash.

Returns:

  • (Hash{String=>Object})


25
26
27
# File 'lib/animoto/postrolls/custom_footage.rb', line 25

def to_hash
  super.merge({'source_url' => source_url, 'start_time' => start_time, 'duration' => duration})
end