Class: Zype::SubtitlePlaylists
- 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
Constant Summary
Constants inherited from BaseModel
Instance Attribute Summary
Attributes inherited from BaseModel
Instance Method Summary collapse
-
#create(video_id:, params:) ⇒ Hash
Creates a new subtitle via the API.
-
#delete(language:, video_id:) ⇒ Hash
Deletes an existing subtitle via the API.
Methods inherited from BaseModel
#all, #auth=, #find, #initialize, #update
Constructor Details
This class inherits a constructor from Zype::BaseModel
Instance Method Details
#create(video_id:, params:) ⇒ Hash
Creates a new subtitle via the API. Files must be hosted and be accessible with a URL
21 22 23 |
# File 'lib/zype/models/subtitle_playlists.rb', line 21 def create(video_id:, params:) client.execute(method: :post, path: "/videos/#{video_id}/subtitle_playlists", params: params) end |
#delete(language:, video_id:) ⇒ Hash
Deletes an existing subtitle via the API
30 31 32 |
# File 'lib/zype/models/subtitle_playlists.rb', line 30 def delete(language:, video_id:) client.execute(method: :delete, path: "/videos/#{video_id}/subtitle_playlists/#{language}") end |