Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from atomical/get_media_package_and_delete_trac…
…k_methods adding methods for getting the media package xml and removing workflow '...
- Loading branch information
Showing
5 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
module Rubyhorn::RestClient | |||
module HLSDistribution | |||
|
|||
def delete_track( media_package, track ) | |||
args = { | |||
:mediapackage => media_package, | |||
:elementId => track | |||
} | |||
|
|||
post("distribution/streaming/retract", args) | |||
end | |||
|
|||
# example usage of delete_track | |||
# def delete_workflow_tracks(workflow_id) | |||
# media_package = Rubyhorn.client.get_media_package(workflow_id) | |||
# tracks = media_package.xpath('//track').map{|node| node.get_attribute('id')} | |||
|
|||
# tracks.each do |track| | |||
# Rubyhorn.client.delete_track(media_package.to_s, track) | |||
# end | |||
# end | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters