shotstack 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +387 -23
  3. data/lib/shotstack/models/asset.rb +1 -1
  4. data/lib/shotstack/models/asset_render_response.rb +5 -0
  5. data/lib/shotstack/models/asset_response.rb +5 -0
  6. data/lib/shotstack/models/asset_response_attributes.rb +15 -0
  7. data/lib/shotstack/models/asset_response_data.rb +10 -0
  8. data/lib/shotstack/models/audio_asset.rb +0 -2
  9. data/lib/shotstack/models/clip.rb +5 -11
  10. data/lib/shotstack/models/destinations.rb +6 -7
  11. data/lib/shotstack/models/edit.rb +1 -3
  12. data/lib/shotstack/models/flip_transformation.rb +0 -4
  13. data/lib/shotstack/models/html_asset.rb +0 -4
  14. data/lib/shotstack/models/mux_destination.rb +1 -1
  15. data/lib/shotstack/models/offset.rb +22 -26
  16. data/lib/shotstack/models/output.rb +15 -8
  17. data/lib/shotstack/models/render_response_data.rb +2 -15
  18. data/lib/shotstack/models/rotate_transformation.rb +0 -2
  19. data/lib/shotstack/models/s3_destination.rb +236 -0
  20. data/lib/shotstack/models/s3_destination_options.rb +270 -0
  21. data/lib/shotstack/models/shotstack_destination.rb +2 -4
  22. data/lib/shotstack/models/size.rb +3 -3
  23. data/lib/shotstack/models/skew_transformation.rb +0 -4
  24. data/lib/shotstack/models/soundtrack.rb +0 -2
  25. data/lib/shotstack/models/template_data_response.rb +1 -1
  26. data/lib/shotstack/models/template_data_response_data.rb +1 -2
  27. data/lib/shotstack/models/template_list_response_item.rb +0 -10
  28. data/lib/shotstack/models/template_render.rb +1 -1
  29. data/lib/shotstack/models/template_response.rb +1 -1
  30. data/lib/shotstack/models/timeline.rb +0 -4
  31. data/lib/shotstack/models/title_asset.rb +1 -7
  32. data/lib/shotstack/models/video_asset.rb +46 -2
  33. data/lib/shotstack/version.rb +1 -1
  34. data/lib/shotstack.rb +2 -0
  35. metadata +15 -12
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Shotstack
17
- # The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
17
+ # **Notice: The title asset is deprecated, use the [HTML asset](#tocs_htmlasset) instead.** The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
18
18
  class TitleAsset
19
19
  # The type of asset - set to `title` for titles.
20
20
  attr_accessor :type
@@ -131,14 +131,10 @@ module Shotstack
131
131
 
132
132
  if attributes.key?(:'color')
133
133
  self.color = attributes[:'color']
134
- else
135
- self.color = '#ffffff'
136
134
  end
137
135
 
138
136
  if attributes.key?(:'size')
139
137
  self.size = attributes[:'size']
140
- else
141
- self.size = 'medium'
142
138
  end
143
139
 
144
140
  if attributes.key?(:'background')
@@ -147,8 +143,6 @@ module Shotstack
147
143
 
148
144
  if attributes.key?(:'position')
149
145
  self.position = attributes[:'position']
150
- else
151
- self.position = 'center'
152
146
  end
153
147
 
154
148
  if attributes.key?(:'offset')
@@ -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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.4.0
11
11
  =end
12
12
 
13
13
  module Shotstack
14
- VERSION = '0.2.1'
14
+ VERSION = '0.2.2'
15
15
  end
data/lib/shotstack.rb CHANGED
@@ -45,6 +45,8 @@ 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'
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.1
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-07-05 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,6 +99,8 @@ 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
@@ -125,7 +127,7 @@ homepage: https://shotstack.io
125
127
  licenses:
126
128
  - MIT
127
129
  metadata: {}
128
- post_install_message:
130
+ post_install_message:
129
131
  rdoc_options: []
130
132
  require_paths:
131
133
  - lib
@@ -140,8 +142,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
142
  - !ruby/object:Gem::Version
141
143
  version: '0'
142
144
  requirements: []
143
- rubygems_version: 3.0.1
144
- signing_key:
145
+ rubyforge_project:
146
+ rubygems_version: 2.7.6
147
+ signing_key:
145
148
  specification_version: 4
146
149
  summary: Shotstack SDK Ruby Gem
147
150
  test_files: []