Sha256: 759f0dbee0579dec9189b522e9ae9f736b6b9788773c9b98e3472ee6ba6e8081

Contents?: true

Size: 574 Bytes

Versions: 8

Compression:

Stored size: 574 Bytes

Contents

module Vzaar
  module Request
    class AddSubtitle < Base
      endpoint "/api/subtitle/upload"
      resource "Status"
      http_verb :post
      authenticated true

      def xml_body
        <<-XML
          <?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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vzaar-1.5.0 lib/vzaar/request/add_subtitle.rb
vzaar-1.4.4 lib/vzaar/request/add_subtitle.rb
vzaar-1.4.1 lib/vzaar/request/add_subtitle.rb
vzaar-1.3.1 lib/vzaar/request/add_subtitle.rb
vzaar-1.3.0 lib/vzaar/request/add_subtitle.rb
vzaar-1.2.4 lib/vzaar/request/add_subtitle.rb
vzaar-1.2.3 lib/vzaar/request/add_subtitle.rb
vzaar-1.2.2 lib/vzaar/request/add_subtitle.rb