shotstack 0.2.0 → 0.2.2

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +387 -23
  3. data/lib/shotstack/api/edit_api.rb +413 -7
  4. data/lib/shotstack/api/serve_api.rb +7 -7
  5. data/lib/shotstack/api_client.rb +1 -1
  6. data/lib/shotstack/api_error.rb +1 -1
  7. data/lib/shotstack/configuration.rb +1 -1
  8. data/lib/shotstack/models/asset.rb +2 -2
  9. data/lib/shotstack/models/asset_render_response.rb +6 -1
  10. data/lib/shotstack/models/asset_response.rb +6 -1
  11. data/lib/shotstack/models/asset_response_attributes.rb +27 -2
  12. data/lib/shotstack/models/asset_response_data.rb +11 -1
  13. data/lib/shotstack/models/audio_asset.rb +1 -3
  14. data/lib/shotstack/models/clip.rb +6 -12
  15. data/lib/shotstack/models/crop.rb +1 -1
  16. data/lib/shotstack/models/destinations.rb +7 -8
  17. data/lib/shotstack/models/edit.rb +2 -4
  18. data/lib/shotstack/models/flip_transformation.rb +1 -5
  19. data/lib/shotstack/models/font.rb +1 -1
  20. data/lib/shotstack/models/html_asset.rb +1 -5
  21. data/lib/shotstack/models/image_asset.rb +1 -1
  22. data/lib/shotstack/models/luma_asset.rb +1 -1
  23. data/lib/shotstack/models/merge_field.rb +1 -1
  24. data/lib/shotstack/models/mux_destination.rb +2 -2
  25. data/lib/shotstack/models/mux_destination_options.rb +1 -1
  26. data/lib/shotstack/models/offset.rb +23 -27
  27. data/lib/shotstack/models/output.rb +16 -9
  28. data/lib/shotstack/models/poster.rb +1 -1
  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 +1 -1
  32. data/lib/shotstack/models/range.rb +1 -1
  33. data/lib/shotstack/models/render_response.rb +1 -1
  34. data/lib/shotstack/models/render_response_data.rb +3 -16
  35. data/lib/shotstack/models/rotate_transformation.rb +1 -3
  36. data/lib/shotstack/models/s3_destination.rb +236 -0
  37. data/lib/shotstack/models/s3_destination_options.rb +270 -0
  38. data/lib/shotstack/models/shotstack_destination.rb +3 -5
  39. data/lib/shotstack/models/size.rb +4 -4
  40. data/lib/shotstack/models/skew_transformation.rb +1 -5
  41. data/lib/shotstack/models/soundtrack.rb +1 -3
  42. data/lib/shotstack/models/template.rb +234 -0
  43. data/lib/shotstack/models/template_data_response.rb +254 -0
  44. data/lib/shotstack/models/template_data_response_data.rb +269 -0
  45. data/lib/shotstack/models/template_list_response.rb +254 -0
  46. data/lib/shotstack/models/template_list_response_data.rb +242 -0
  47. data/lib/shotstack/models/template_list_response_item.rb +260 -0
  48. data/lib/shotstack/models/template_render.rb +237 -0
  49. data/lib/shotstack/models/template_response.rb +254 -0
  50. data/lib/shotstack/models/template_response_data.rb +240 -0
  51. data/lib/shotstack/models/thumbnail.rb +1 -1
  52. data/lib/shotstack/models/timeline.rb +1 -5
  53. data/lib/shotstack/models/title_asset.rb +2 -8
  54. data/lib/shotstack/models/track.rb +1 -1
  55. data/lib/shotstack/models/transformation.rb +1 -1
  56. data/lib/shotstack/models/transition.rb +1 -1
  57. data/lib/shotstack/models/video_asset.rb +47 -3
  58. data/lib/shotstack/version.rb +2 -2
  59. data/lib/shotstack.rb +12 -1
  60. metadata +24 -12
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -25,11 +25,36 @@ module Shotstack
25
25
  # The start trim point of the video clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached.
26
26
  attr_accessor :trim
27
27
 
28
- # Set the volume for the video clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 0).
28
+ # Set the volume for the video clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1).
29
29
  attr_accessor :volume
30
30
 
31
+ # The volume effect to apply to the video asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>
32
+ attr_accessor :volume_effect
33
+
31
34
  attr_accessor :crop
32
35
 
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
33
58
  # Attribute mapping from ruby-style variable name to JSON key.
34
59
  def self.attribute_map
35
60
  {
@@ -37,6 +62,7 @@ module Shotstack
37
62
  :'src' => :'src',
38
63
  :'trim' => :'trim',
39
64
  :'volume' => :'volume',
65
+ :'volume_effect' => :'volumeEffect',
40
66
  :'crop' => :'crop'
41
67
  }
42
68
  end
@@ -53,6 +79,7 @@ module Shotstack
53
79
  :'src' => :'String',
54
80
  :'trim' => :'Float',
55
81
  :'volume' => :'Float',
82
+ :'volume_effect' => :'String',
56
83
  :'crop' => :'Crop'
57
84
  }
58
85
  end
@@ -96,6 +123,10 @@ module Shotstack
96
123
  self.volume = attributes[:'volume']
97
124
  end
98
125
 
126
+ if attributes.key?(:'volume_effect')
127
+ self.volume_effect = attributes[:'volume_effect']
128
+ end
129
+
99
130
  if attributes.key?(:'crop')
100
131
  self.crop = attributes[:'crop']
101
132
  end
@@ -121,9 +152,21 @@ module Shotstack
121
152
  def valid?
122
153
  return false if @type.nil?
123
154
  return false if @src.nil?
155
+ volume_effect_validator = EnumAttributeValidator.new('String', ["fadeIn", "fadeOut", "fadeInFadeOut"])
156
+ return false unless volume_effect_validator.valid?(@volume_effect)
124
157
  true
125
158
  end
126
159
 
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] volume_effect Object to be assigned
162
+ def volume_effect=(volume_effect)
163
+ validator = EnumAttributeValidator.new('String', ["fadeIn", "fadeOut", "fadeInFadeOut"])
164
+ unless validator.valid?(volume_effect)
165
+ fail ArgumentError, "invalid value for \"volume_effect\", must be one of #{validator.allowable_values}."
166
+ end
167
+ @volume_effect = volume_effect
168
+ end
169
+
127
170
  # Checks equality by comparing each attribute.
128
171
  # @param [Object] Object to be compared
129
172
  def ==(o)
@@ -133,6 +176,7 @@ module Shotstack
133
176
  src == o.src &&
134
177
  trim == o.trim &&
135
178
  volume == o.volume &&
179
+ volume_effect == o.volume_effect &&
136
180
  crop == o.crop
137
181
  end
138
182
 
@@ -145,7 +189,7 @@ module Shotstack
145
189
  # Calculates hash code according to all attributes.
146
190
  # @return [Integer] Hash code
147
191
  def hash
148
- [type, src, trim, volume, crop].hash
192
+ [type, src, trim, volume, volume_effect, crop].hash
149
193
  end
150
194
 
151
195
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.4.0
11
11
  =end
12
12
 
13
13
  module Shotstack
14
- VERSION = '0.2.0'
14
+ VERSION = '0.2.2'
15
15
  end
data/lib/shotstack.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -45,10 +45,21 @@ require 'shotstack/models/range'
45
45
  require 'shotstack/models/render_response'
46
46
  require 'shotstack/models/render_response_data'
47
47
  require 'shotstack/models/rotate_transformation'
48
+ require 'shotstack/models/s3_destination'
49
+ require 'shotstack/models/s3_destination_options'
48
50
  require 'shotstack/models/shotstack_destination'
49
51
  require 'shotstack/models/size'
50
52
  require 'shotstack/models/skew_transformation'
51
53
  require 'shotstack/models/soundtrack'
54
+ require 'shotstack/models/template'
55
+ require 'shotstack/models/template_data_response'
56
+ require 'shotstack/models/template_data_response_data'
57
+ require 'shotstack/models/template_list_response'
58
+ require 'shotstack/models/template_list_response_data'
59
+ require 'shotstack/models/template_list_response_item'
60
+ require 'shotstack/models/template_render'
61
+ require 'shotstack/models/template_response'
62
+ require 'shotstack/models/template_response_data'
52
63
  require 'shotstack/models/thumbnail'
53
64
  require 'shotstack/models/timeline'
54
65
  require 'shotstack/models/title_asset'
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.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shotstack
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-03 00:00:00.000000000 Z
11
+ date: 2022-12-17 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.0
40
37
  - - "~>"
41
38
  - !ruby/object:Gem::Version
42
39
  version: '3.6'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 3.6.0
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.0
50
47
  - - "~>"
51
48
  - !ruby/object:Gem::Version
52
49
  version: '3.6'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 3.6.0
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
@@ -99,10 +99,21 @@ files:
99
99
  - lib/shotstack/models/render_response.rb
100
100
  - lib/shotstack/models/render_response_data.rb
101
101
  - lib/shotstack/models/rotate_transformation.rb
102
+ - lib/shotstack/models/s3_destination.rb
103
+ - lib/shotstack/models/s3_destination_options.rb
102
104
  - lib/shotstack/models/shotstack_destination.rb
103
105
  - lib/shotstack/models/size.rb
104
106
  - lib/shotstack/models/skew_transformation.rb
105
107
  - lib/shotstack/models/soundtrack.rb
108
+ - lib/shotstack/models/template.rb
109
+ - lib/shotstack/models/template_data_response.rb
110
+ - lib/shotstack/models/template_data_response_data.rb
111
+ - lib/shotstack/models/template_list_response.rb
112
+ - lib/shotstack/models/template_list_response_data.rb
113
+ - lib/shotstack/models/template_list_response_item.rb
114
+ - lib/shotstack/models/template_render.rb
115
+ - lib/shotstack/models/template_response.rb
116
+ - lib/shotstack/models/template_response_data.rb
106
117
  - lib/shotstack/models/thumbnail.rb
107
118
  - lib/shotstack/models/timeline.rb
108
119
  - lib/shotstack/models/title_asset.rb
@@ -116,7 +127,7 @@ homepage: https://shotstack.io
116
127
  licenses:
117
128
  - MIT
118
129
  metadata: {}
119
- post_install_message:
130
+ post_install_message:
120
131
  rdoc_options: []
121
132
  require_paths:
122
133
  - lib
@@ -131,8 +142,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
142
  - !ruby/object:Gem::Version
132
143
  version: '0'
133
144
  requirements: []
134
- rubygems_version: 3.0.1
135
- signing_key:
145
+ rubyforge_project:
146
+ rubygems_version: 2.7.6
147
+ signing_key:
136
148
  specification_version: 4
137
149
  summary: Shotstack SDK Ruby Gem
138
150
  test_files: []