shotstack 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1099 -11
  3. data/lib/shotstack/api/edit_api.rb +6 -3
  4. data/lib/shotstack/api/serve_api.rb +2 -2
  5. data/lib/shotstack/api_client.rb +4 -4
  6. data/lib/shotstack/api_error.rb +2 -2
  7. data/lib/shotstack/configuration.rb +9 -6
  8. data/lib/shotstack/models/asset.rb +42 -11
  9. data/lib/shotstack/models/asset_render_response.rb +2 -2
  10. data/lib/shotstack/models/asset_response.rb +2 -2
  11. data/lib/shotstack/models/asset_response_attributes.rb +2 -2
  12. data/lib/shotstack/models/asset_response_data.rb +2 -2
  13. data/lib/shotstack/models/audio_asset.rb +3 -4
  14. data/lib/shotstack/models/clip.rb +2 -3
  15. data/lib/shotstack/models/crop.rb +2 -2
  16. data/lib/shotstack/models/destinations.rb +256 -0
  17. data/lib/shotstack/models/edit.rb +4 -4
  18. data/lib/shotstack/models/flip_transformation.rb +2 -2
  19. data/lib/shotstack/models/font.rb +2 -2
  20. data/lib/shotstack/models/html_asset.rb +5 -6
  21. data/lib/shotstack/models/image_asset.rb +3 -4
  22. data/lib/shotstack/models/luma_asset.rb +3 -4
  23. data/lib/shotstack/models/merge_field.rb +3 -3
  24. data/lib/shotstack/models/mux_destination.rb +236 -0
  25. data/lib/shotstack/models/mux_destination_options.rb +244 -0
  26. data/lib/shotstack/models/offset.rb +2 -2
  27. data/lib/shotstack/models/output.rb +6 -9
  28. data/lib/shotstack/models/poster.rb +2 -2
  29. data/lib/shotstack/models/probe_response.rb +2 -2
  30. data/lib/shotstack/models/queued_response.rb +2 -2
  31. data/lib/shotstack/models/queued_response_data.rb +2 -2
  32. data/lib/shotstack/models/range.rb +2 -2
  33. data/lib/shotstack/models/render_response.rb +2 -2
  34. data/lib/shotstack/models/render_response_data.rb +2 -2
  35. data/lib/shotstack/models/rotate_transformation.rb +2 -2
  36. data/lib/shotstack/models/shotstack_destination.rb +3 -4
  37. data/lib/shotstack/models/size.rb +2 -2
  38. data/lib/shotstack/models/skew_transformation.rb +2 -2
  39. data/lib/shotstack/models/soundtrack.rb +2 -2
  40. data/lib/shotstack/models/thumbnail.rb +2 -2
  41. data/lib/shotstack/models/timeline.rb +3 -3
  42. data/lib/shotstack/models/title_asset.rb +3 -4
  43. data/lib/shotstack/models/track.rb +2 -2
  44. data/lib/shotstack/models/transformation.rb +2 -2
  45. data/lib/shotstack/models/transition.rb +2 -2
  46. data/lib/shotstack/models/video_asset.rb +3 -4
  47. data/lib/shotstack/version.rb +3 -3
  48. data/lib/shotstack.rb +6 -3
  49. data/shotstack.gemspec +2 -2
  50. metadata +14 -14
  51. data/lib/shotstack/api/endpoints_api.rb +0 -158
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shotstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shotstack
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-04 00:00:00.000000000 Z
11
+ date: 2022-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -34,22 +34,22 @@ dependencies:
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '3.6'
40
37
  - - ">="
41
38
  - !ruby/object:Gem::Version
42
39
  version: 3.6.0
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '3.6'
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '3.6'
50
47
  - - ">="
51
48
  - !ruby/object:Gem::Version
52
49
  version: 3.6.0
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '3.6'
53
53
  description: 'Shotstack is a video, image and audio editing service that allows for
54
54
  the automated generation of videos, images and audio using JSON and a RESTful API. You
55
55
  arrange and configure an edit and POST it to the API which will render your media
@@ -67,7 +67,6 @@ files:
67
67
  - README.md
68
68
  - lib/shotstack.rb
69
69
  - lib/shotstack/api/edit_api.rb
70
- - lib/shotstack/api/endpoints_api.rb
71
70
  - lib/shotstack/api/serve_api.rb
72
71
  - lib/shotstack/api_client.rb
73
72
  - lib/shotstack/api_error.rb
@@ -88,6 +87,8 @@ files:
88
87
  - lib/shotstack/models/image_asset.rb
89
88
  - lib/shotstack/models/luma_asset.rb
90
89
  - lib/shotstack/models/merge_field.rb
90
+ - lib/shotstack/models/mux_destination.rb
91
+ - lib/shotstack/models/mux_destination_options.rb
91
92
  - lib/shotstack/models/offset.rb
92
93
  - lib/shotstack/models/output.rb
93
94
  - lib/shotstack/models/poster.rb
@@ -115,7 +116,7 @@ homepage: https://shotstack.io
115
116
  licenses:
116
117
  - MIT
117
118
  metadata: {}
118
- post_install_message:
119
+ post_install_message:
119
120
  rdoc_options: []
120
121
  require_paths:
121
122
  - lib
@@ -130,9 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
131
  - !ruby/object:Gem::Version
131
132
  version: '0'
132
133
  requirements: []
133
- rubyforge_project:
134
- rubygems_version: 2.7.6
135
- signing_key:
134
+ rubygems_version: 3.0.1
135
+ signing_key:
136
136
  specification_version: 4
137
137
  summary: Shotstack SDK Ruby Gem
138
138
  test_files: []
@@ -1,158 +0,0 @@
1
- =begin
2
- #Shotstack
3
-
4
- #The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
5
-
6
- The version of the OpenAPI document: v1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Shotstack
16
- class EndpointsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Get Render Status
23
- # Get the rendering status, video url and details of a timeline by ID.
24
- # @param id [String] The id of the timeline render task in UUID format
25
- # @param [Hash] opts the optional parameters
26
- # @return [RenderResponse]
27
- def get_render(id, opts = {})
28
- data, _status_code, _headers = get_render_with_http_info(id, opts)
29
- data
30
- end
31
-
32
- # Get Render Status
33
- # Get the rendering status, video url and details of a timeline by ID.
34
- # @param id [String] The id of the timeline render task in UUID format
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(RenderResponse, Integer, Hash)>] RenderResponse data, response status code and response headers
37
- def get_render_with_http_info(id, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: EndpointsApi.get_render ...'
40
- end
41
- # verify the required parameter 'id' is set
42
- if @api_client.config.client_side_validation && id.nil?
43
- fail ArgumentError, "Missing the required parameter 'id' when calling EndpointsApi.get_render"
44
- end
45
- pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
46
- if @api_client.config.client_side_validation && id !~ pattern
47
- fail ArgumentError, "invalid value for 'id' when calling EndpointsApi.get_render, must conform to the pattern #{pattern}."
48
- end
49
-
50
- # resource path
51
- local_var_path = '/render/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
52
-
53
- # query parameters
54
- query_params = opts[:query_params] || {}
55
-
56
- # header parameters
57
- header_params = opts[:header_params] || {}
58
- # HTTP header 'Accept' (if needed)
59
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body]
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'RenderResponse'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['DeveloperKey']
72
-
73
- new_options = opts.merge(
74
- :operation => :"EndpointsApi.get_render",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: EndpointsApi#get_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
-
90
- # Render Video
91
- # Queue and render the contents of a timeline as a video file.
92
- # @param edit [Edit] The video edit specified using JSON.
93
- # @param [Hash] opts the optional parameters
94
- # @option opts [String] :x_api_queue_id The id of a dedicated queue (enterprise customers only).
95
- # @return [QueuedResponse]
96
- def post_render(edit, opts = {})
97
- data, _status_code, _headers = post_render_with_http_info(edit, opts)
98
- data
99
- end
100
-
101
- # Render Video
102
- # Queue and render the contents of a timeline as a video file.
103
- # @param edit [Edit] The video edit specified using JSON.
104
- # @param [Hash] opts the optional parameters
105
- # @option opts [String] :x_api_queue_id The id of a dedicated queue (enterprise customers only).
106
- # @return [Array<(QueuedResponse, Integer, Hash)>] QueuedResponse data, response status code and response headers
107
- def post_render_with_http_info(edit, opts = {})
108
- if @api_client.config.debugging
109
- @api_client.config.logger.debug 'Calling API: EndpointsApi.post_render ...'
110
- end
111
- # verify the required parameter 'edit' is set
112
- if @api_client.config.client_side_validation && edit.nil?
113
- fail ArgumentError, "Missing the required parameter 'edit' when calling EndpointsApi.post_render"
114
- end
115
- # resource path
116
- local_var_path = '/render'
117
-
118
- # query parameters
119
- query_params = opts[:query_params] || {}
120
-
121
- # header parameters
122
- header_params = opts[:header_params] || {}
123
- # HTTP header 'Accept' (if needed)
124
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
- # HTTP header 'Content-Type'
126
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
127
- header_params[:'x-api-queue-id'] = opts[:'x_api_queue_id'] if !opts[:'x_api_queue_id'].nil?
128
-
129
- # form parameters
130
- form_params = opts[:form_params] || {}
131
-
132
- # http body (model)
133
- post_body = opts[:debug_body] || @api_client.object_to_http_body(edit)
134
-
135
- # return_type
136
- return_type = opts[:debug_return_type] || 'QueuedResponse'
137
-
138
- # auth_names
139
- auth_names = opts[:debug_auth_names] || ['DeveloperKey']
140
-
141
- new_options = opts.merge(
142
- :operation => :"EndpointsApi.post_render",
143
- :header_params => header_params,
144
- :query_params => query_params,
145
- :form_params => form_params,
146
- :body => post_body,
147
- :auth_names => auth_names,
148
- :return_type => return_type
149
- )
150
-
151
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
- if @api_client.config.debugging
153
- @api_client.config.logger.debug "API called: EndpointsApi#post_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
- end
155
- return data, status_code, headers
156
- end
157
- end
158
- end