Class: Zype::SubtitlePlaylists

Inherits:
Base::Videos show all
Defined in:
lib/zype/models/subtitle_playlists.rb

Overview

The Subtitle Playlists API allows users to integrate subtitles with HLS manifests from a Zype video source. It’s a simple way to add subtitles which will be supported in all platforms that implement the Apple HLS specification. This class does not support all, find and update methods. Read more at docs.zype.com/v1.0/reference#subtitle-playlists

Since:

  • 0.7.0

Constant Summary

Constants inherited from BaseModel

BaseModel::ACCEPTED_KEYS

Instance Attribute Summary

Attributes inherited from BaseModel

#client, #path

Instance Method Summary collapse

Methods inherited from Base::Videos

#all, #create, #find, #update

Methods inherited from BaseModel

#all, #auth=, #create, #find, #initialize, #update

Constructor Details

This class inherits a constructor from Zype::BaseModel

Instance Method Details

#delete(language:, video_id:) ⇒ Hash

Deletes an existing subtitle via the API

Parameters:

  • language (String)

    language of the playlist - must be full name - not code

  • video_id (String)

    ID of the video the subtitle belongs to

Returns:

  • (Hash)

    the deleted subtitle

Since:

  • 0.7.0



20
21
22
# File 'lib/zype/models/subtitle_playlists.rb', line 20

def delete(language:, video_id:)
  client.execute(method: :delete, path: "/videos/#{video_id}/subtitle_playlists/#{language}")
end