Class: Warb::Resources::Video

Inherits:
Resource
  • Object
show all
Defined in:
lib/warb/resources/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#add_document_header, #add_image_header, #add_text_header, #add_video_header, #build_template_named_parameter, #build_template_positional_parameter, #call, #initialize

Methods included from Validation

#blank?, #raw_value, #resolve, #validates

Constructor Details

This class inherits a constructor from Warb::Resources::Resource

Instance Attribute Details

#captionObject

Returns the value of attribute caption.



6
7
8
# File 'lib/warb/resources/video.rb', line 6

def caption
  @caption
end

Returns the value of attribute link.



6
7
8
# File 'lib/warb/resources/video.rb', line 6

def link
  @link
end

#media_idObject

Returns the value of attribute media_id.



6
7
8
# File 'lib/warb/resources/video.rb', line 6

def media_id
  @media_id
end

Instance Method Details

#build_headerObject



8
9
10
# File 'lib/warb/resources/video.rb', line 8

def build_header
  common_video_params
end

#build_payloadObject



12
13
14
15
16
# File 'lib/warb/resources/video.rb', line 12

def build_payload
  params = common_video_params
  params[:video][:caption] = caption || @params[:caption]
  params
end