Class: Vzaar::Request::GenerateThumbnail

Inherits:
Video
  • Object
show all
Defined in:
lib/vzaar/request/generate_thumbnail.rb

Direct Known Subclasses

UploadThumbnail

Instance Attribute Summary

Attributes inherited from Base

#conn, #opts

Instance Method Summary collapse

Methods inherited from Video

#video_id

Methods inherited from Base

endpoint, #execute, format, resource

Methods included from Helper

#blank?, #hash_to_xml, #symb_keys

Instance Method Details

#json_bodyObject



15
16
17
# File 'lib/vzaar/request/generate_thumbnail.rb', line 15

def json_body
  { "vzaar-api" => { "video" => { "thumb_time" => options[:time] }}}
end

#xml_bodyObject



9
10
11
12
13
# File 'lib/vzaar/request/generate_thumbnail.rb', line 9

def xml_body
  <<-XML
    <?xml version="1.0" encoding="UTF-8"?>#{hash_to_xml(json_body)}
  XML
end