Sha256: abce7c30553bfe453e60a973b85bb7c2d4f617118f348628336f150637dc4567

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

module Zype
  class Videos < Zype::BaseModel
    # Adds zobjects to video
    #
    # @param id [String] the ID of the video
    # @param zobject_ids [Array<String>] an array of zobject IDs
    # @return [Hash] the video object
    def add_zobjects(id:, zobject_ids:)
      client.execute(method: :put, path: "/videos/#{id}/add_zobjects", params: { zobject_id: zobject_ids })
    end

    # Removes zobjects from video
    #
    # @param id [String] the ID of the video
    # @param zobject_ids [Array<String>] an array of zobject IDs
    # @return [Hash] the video object
    def remove_zobjects(id:, zobject_ids:)
      client.execute(method: :put, path: "/videos/#{id}/remove_zobjects", params: { zobject_id: zobject_ids })
    end

    # Returns the original source file for the video
    #
    # @param id [String] the ID of the video
    # @return [Hash] object containing a "url" key for the original source file
    def download(id:)
      client.execute(method: :get, path: "/videos/#{id}/download")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zype-0.5.0 lib/zype/models/videos.rb
zype-0.4.0 lib/zype/models/videos.rb