Class: ElasticTranscoder::Pipeline
- Inherits:
-
Object
- Object
- ElasticTranscoder::Pipeline
- Defined in:
- lib/elastic_transcoder/pipeline.rb
Instance Method Summary collapse
- #create_pipeline(name, input_bucket, output_bucket, role) ⇒ Object
- #delete_pipeline(pipeline_id) ⇒ Object
-
#initialize ⇒ Pipeline
constructor
A new instance of Pipeline.
- #pipeline(pipeline_id) ⇒ Object
- #pipelines ⇒ Object
Constructor Details
#initialize ⇒ Pipeline
Returns a new instance of Pipeline.
5 6 7 |
# File 'lib/elastic_transcoder/pipeline.rb', line 5 def initialize @utilities = ElasticTranscoder::Utilities.new end |
Instance Method Details
#create_pipeline(name, input_bucket, output_bucket, role) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/elastic_transcoder/pipeline.rb', line 9 def create_pipeline name, input_bucket, output_bucket, role action = "pipelines" creation_params = '{"Name":"'+name+'","InputBucket":"'+input_bucket+'","OutputBucket":"'+output_bucket+'","Role":"'+role+'","Notifications":{"Progressing":"","Completed":"","Warning":"","Error":"arn:aws:sns:us-east-1:111222333444:ETS_Errors"}}' headers = @utilities.initialize_headers action, {:method=>"POST", :payload=>creation_params} url = @utilities.build_url action response = @utilities.execute_post url, headers, creation_params end |
#delete_pipeline(pipeline_id) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/elastic_transcoder/pipeline.rb', line 31 def delete_pipeline pipeline_id action = "pipelines/#{pipeline_id}" headers = @utilities.initialize_headers action, {:method=>"DELETE", :payload=>""} url = @utilities.build_url action response = @utilities.execute_delete url, headers end |
#pipeline(pipeline_id) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/elastic_transcoder/pipeline.rb', line 17 def pipeline pipeline_id action = "pipelines/#{pipeline_id}" headers = @utilities.initialize_headers action, {:method=>"GET", :payload=>""} url = @utilities.build_url action response = @utilities.execute_get url, headers end |
#pipelines ⇒ Object
24 25 26 27 28 29 |
# File 'lib/elastic_transcoder/pipeline.rb', line 24 def pipelines action = "pipelines" headers = @utilities.initialize_headers action, {:method=>"GET", :payload=>""} url = @utilities.build_url action response = @utilities.execute_get url, headers end |