Sha256: 735c9febd5d7a3305e2caf7c65bf367e4b08685f3bca373b3cd114d139331ec4

Contents?: true

Size: 588 Bytes

Versions: 6

Compression:

Stored size: 588 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" => sanitize_str(options[:body])
            }
          }
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vzaar-1.6.2 lib/vzaar/request/add_subtitle.rb
vzaar-1.6.1 lib/vzaar/request/add_subtitle.rb
vzaar-1.6.0 lib/vzaar/request/add_subtitle.rb
vzaar-1.5.3 lib/vzaar/request/add_subtitle.rb
vzaar-1.5.2 lib/vzaar/request/add_subtitle.rb
vzaar-1.5.1 lib/vzaar/request/add_subtitle.rb