Skip to content

Commit

Permalink
json_body added to request/add_subtitle
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Chraplewski committed May 29, 2014
1 parent f926416 commit ab5505e
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/vzaar/request/add_subtitle.rb
Expand Up @@ -8,16 +8,20 @@ class AddSubtitle < Base

def xml_body
<<-XML
<?xml version="1.0" encoding="UTF-8"?>
<vzaar-api>
<subtitle>
<language>#{options[:language]}</language>
<video_id>#{options[:video_id]}</video_id>
<body>#{options[:body]}</body>
</subtitle>
</vzaar-api>
<?xml version="1.0" encoding="UTF-8"?>#{hash_to_xml(json_body)}
XML
end

def json_body
{ "vzaar-api" => {
"subtitle" => {
"language" => options[:language],
"video_id" => options[:video_id],
"body" => options[:body]
}
}
}
end
end
end
end

0 comments on commit ab5505e

Please sign in to comment.