shotstack 0.1.3 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
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 check https://shotstack.io
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
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module Shotstack
16
17
  # A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
@@ -25,6 +26,11 @@ module Shotstack
25
26
  }
26
27
  end
27
28
 
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
28
34
  # Attribute type mapping.
29
35
  def self.openapi_types
30
36
  {
@@ -111,7 +117,9 @@ module Shotstack
111
117
  def build_from_hash(attributes)
112
118
  return nil unless attributes.is_a?(Hash)
113
119
  self.class.openapi_types.each_pair do |key, type|
114
- if type =~ /\AArray<(.*)>/i
120
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
121
+ self.send("#{key}=", nil)
122
+ elsif type =~ /\AArray<(.*)>/i
115
123
  # check to ensure the input is an array given that the attribute
116
124
  # is documented as an array but the input is not
117
125
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -119,7 +127,7 @@ module Shotstack
119
127
  end
120
128
  elsif !attributes[self.class.attribute_map[key]].nil?
121
129
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
- end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
123
131
  end
124
132
 
125
133
  self
@@ -131,8 +139,8 @@ module Shotstack
131
139
  # @return [Object] Deserialized data
132
140
  def _deserialize(type, value)
133
141
  case type.to_sym
134
- when :DateTime
135
- DateTime.parse(value)
142
+ when :Time
143
+ Time.parse(value)
136
144
  when :Date
137
145
  Date.parse(value)
138
146
  when :String
@@ -162,7 +170,9 @@ module Shotstack
162
170
  end
163
171
  end
164
172
  else # model
165
- Shotstack.const_get(type).build_from_hash(value)
173
+ # models (e.g. Pet) or oneOf
174
+ klass = Shotstack.const_get(type)
175
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
166
176
  end
167
177
  end
168
178
 
@@ -188,7 +198,7 @@ module Shotstack
188
198
  is_nullable = self.class.openapi_nullable.include?(attr)
189
199
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
200
  end
191
-
201
+
192
202
  hash[param] = _to_hash(value)
193
203
  end
194
204
  hash
@@ -211,5 +221,7 @@ module Shotstack
211
221
  value
212
222
  end
213
223
  end
224
+
214
225
  end
226
+
215
227
  end
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
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 check https://shotstack.io
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
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
 
15
16
  module Shotstack
16
17
  # In and out transitions for a clip - i.e. fade in and fade out
@@ -51,6 +52,11 @@ module Shotstack
51
52
  }
52
53
  end
53
54
 
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ attribute_map.values
58
+ end
59
+
54
60
  # Attribute type mapping.
55
61
  def self.openapi_types
56
62
  {
@@ -160,7 +166,9 @@ module Shotstack
160
166
  def build_from_hash(attributes)
161
167
  return nil unless attributes.is_a?(Hash)
162
168
  self.class.openapi_types.each_pair do |key, type|
163
- if type =~ /\AArray<(.*)>/i
169
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
170
+ self.send("#{key}=", nil)
171
+ elsif type =~ /\AArray<(.*)>/i
164
172
  # check to ensure the input is an array given that the attribute
165
173
  # is documented as an array but the input is not
166
174
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -168,7 +176,7 @@ module Shotstack
168
176
  end
169
177
  elsif !attributes[self.class.attribute_map[key]].nil?
170
178
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
- end # or else data not found in attributes(hash), not an issue as the data can be optional
179
+ end
172
180
  end
173
181
 
174
182
  self
@@ -180,8 +188,8 @@ module Shotstack
180
188
  # @return [Object] Deserialized data
181
189
  def _deserialize(type, value)
182
190
  case type.to_sym
183
- when :DateTime
184
- DateTime.parse(value)
191
+ when :Time
192
+ Time.parse(value)
185
193
  when :Date
186
194
  Date.parse(value)
187
195
  when :String
@@ -211,7 +219,9 @@ module Shotstack
211
219
  end
212
220
  end
213
221
  else # model
214
- Shotstack.const_get(type).build_from_hash(value)
222
+ # models (e.g. Pet) or oneOf
223
+ klass = Shotstack.const_get(type)
224
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
215
225
  end
216
226
  end
217
227
 
@@ -237,7 +247,7 @@ module Shotstack
237
247
  is_nullable = self.class.openapi_nullable.include?(attr)
238
248
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
249
  end
240
-
250
+
241
251
  hash[param] = _to_hash(value)
242
252
  end
243
253
  hash
@@ -260,5 +270,7 @@ module Shotstack
260
270
  value
261
271
  end
262
272
  end
273
+
263
274
  end
275
+
264
276
  end
@@ -1,16 +1,17 @@
1
1
  =begin
2
2
  #Shotstack
3
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 check https://shotstack.io
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
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
+ require 'time'
14
15
  require_relative 'asset'
15
16
 
16
17
  module Shotstack
@@ -28,23 +29,32 @@ module Shotstack
28
29
  # Set the volume for the video clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 0).
29
30
  attr_accessor :volume
30
31
 
32
+ attr_accessor :crop
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
34
37
  :'type' => :'type',
35
38
  :'src' => :'src',
36
39
  :'trim' => :'trim',
37
- :'volume' => :'volume'
40
+ :'volume' => :'volume',
41
+ :'crop' => :'crop'
38
42
  }
39
43
  end
40
44
 
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
41
50
  # Attribute type mapping.
42
51
  def self.openapi_types
43
52
  {
44
53
  :'type' => :'String',
45
54
  :'src' => :'String',
46
55
  :'trim' => :'Float',
47
- :'volume' => :'Float'
56
+ :'volume' => :'Float',
57
+ :'crop' => :'Crop'
48
58
  }
49
59
  end
50
60
 
@@ -86,6 +96,10 @@ module Shotstack
86
96
  if attributes.key?(:'volume')
87
97
  self.volume = attributes[:'volume']
88
98
  end
99
+
100
+ if attributes.key?(:'crop')
101
+ self.crop = attributes[:'crop']
102
+ end
89
103
  end
90
104
 
91
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -119,7 +133,8 @@ module Shotstack
119
133
  type == o.type &&
120
134
  src == o.src &&
121
135
  trim == o.trim &&
122
- volume == o.volume
136
+ volume == o.volume &&
137
+ crop == o.crop
123
138
  end
124
139
 
125
140
  # @see the `==` method
@@ -131,7 +146,7 @@ module Shotstack
131
146
  # Calculates hash code according to all attributes.
132
147
  # @return [Integer] Hash code
133
148
  def hash
134
- [type, src, trim, volume].hash
149
+ [type, src, trim, volume, crop].hash
135
150
  end
136
151
 
137
152
  # Builds the object from hash
@@ -147,7 +162,9 @@ module Shotstack
147
162
  def build_from_hash(attributes)
148
163
  return nil unless attributes.is_a?(Hash)
149
164
  self.class.openapi_types.each_pair do |key, type|
150
- if type =~ /\AArray<(.*)>/i
165
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
+ self.send("#{key}=", nil)
167
+ elsif type =~ /\AArray<(.*)>/i
151
168
  # check to ensure the input is an array given that the attribute
152
169
  # is documented as an array but the input is not
153
170
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -155,7 +172,7 @@ module Shotstack
155
172
  end
156
173
  elsif !attributes[self.class.attribute_map[key]].nil?
157
174
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
- end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
159
176
  end
160
177
 
161
178
  self
@@ -167,8 +184,8 @@ module Shotstack
167
184
  # @return [Object] Deserialized data
168
185
  def _deserialize(type, value)
169
186
  case type.to_sym
170
- when :DateTime
171
- DateTime.parse(value)
187
+ when :Time
188
+ Time.parse(value)
172
189
  when :Date
173
190
  Date.parse(value)
174
191
  when :String
@@ -198,7 +215,9 @@ module Shotstack
198
215
  end
199
216
  end
200
217
  else # model
201
- Shotstack.const_get(type).build_from_hash(value)
218
+ # models (e.g. Pet) or oneOf
219
+ klass = Shotstack.const_get(type)
220
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
221
  end
203
222
  end
204
223
 
@@ -224,7 +243,7 @@ module Shotstack
224
243
  is_nullable = self.class.openapi_nullable.include?(attr)
225
244
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
245
  end
227
-
246
+
228
247
  hash[param] = _to_hash(value)
229
248
  end
230
249
  hash
@@ -247,5 +266,7 @@ module Shotstack
247
266
  value
248
267
  end
249
268
  end
269
+
250
270
  end
271
+
251
272
  end
@@ -1,15 +1,15 @@
1
1
  =begin
2
2
  #Shotstack
3
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 check https://shotstack.io
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
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1
9
+ OpenAPI Generator version: 5.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  module Shotstack
14
- VERSION = '0.1.3'
14
+ VERSION = '0.1.7'
15
15
  end
data/shotstack.gemspec CHANGED
@@ -3,12 +3,12 @@
3
3
  =begin
4
4
  #Shotstack
5
5
 
6
- #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 check https://shotstack.io
6
+ #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.
7
7
 
8
8
  The version of the OpenAPI document: v1
9
9
 
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.2.1
11
+ OpenAPI Generator version: 5.0.0
12
12
 
13
13
  =end
14
14
 
@@ -19,16 +19,15 @@ Gem::Specification.new do |s|
19
19
  s.name = "shotstack"
20
20
  s.version = Shotstack::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
- s.authors = ["OpenAPI-Generator"]
22
+ s.authors = ["Shotstack"]
23
23
  s.email = [""]
24
- s.homepage = "https://openapi-generator.tech"
25
- s.summary = "Shotstack Ruby Gem"
26
- s.description = "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 check https://shotstack.io"
27
- s.license = "Unlicense"
28
- s.required_ruby_version = ">= 1.9"
24
+ s.homepage = "https://shotstack.io"
25
+ s.summary = "Shotstack SDK Ruby Gem"
26
+ s.description = "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."
27
+ s.license = "MIT"
28
+ s.required_ruby_version = ">= 2.4"
29
29
 
30
30
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
- s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
31
 
33
32
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
33
 
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.3
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
- - OpenAPI-Generator
7
+ - Shotstack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-31 00:00:00.000000000 Z
11
+ date: 2021-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -30,26 +30,6 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.0.1
33
- - !ruby/object:Gem::Dependency
34
- name: json
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '2.1'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 2.1.0
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '2.1'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 2.1.0
53
33
  - !ruby/object:Gem::Dependency
54
34
  name: rspec
55
35
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +53,8 @@ dependencies:
73
53
  description: The Shotstack API is a video editing service that allows for the automated
74
54
  creation of videos using JSON. You can configure an edit and POST it to the Shotstack
75
55
  API which will render your video and provide a file location when complete. For
76
- more details check https://shotstack.io
56
+ more details visit [shotstack.io](https://shotstack.io) or checkout our [getting
57
+ started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
77
58
  email:
78
59
  - ''
79
60
  executables: []
@@ -89,6 +70,7 @@ files:
89
70
  - lib/shotstack/models/asset.rb
90
71
  - lib/shotstack/models/audio_asset.rb
91
72
  - lib/shotstack/models/clip.rb
73
+ - lib/shotstack/models/crop.rb
92
74
  - lib/shotstack/models/edit.rb
93
75
  - lib/shotstack/models/font.rb
94
76
  - lib/shotstack/models/html_asset.rb
@@ -99,6 +81,7 @@ files:
99
81
  - lib/shotstack/models/poster.rb
100
82
  - lib/shotstack/models/queued_response.rb
101
83
  - lib/shotstack/models/queued_response_data.rb
84
+ - lib/shotstack/models/range.rb
102
85
  - lib/shotstack/models/render_response.rb
103
86
  - lib/shotstack/models/render_response_data.rb
104
87
  - lib/shotstack/models/soundtrack.rb
@@ -110,9 +93,9 @@ files:
110
93
  - lib/shotstack/models/video_asset.rb
111
94
  - lib/shotstack/version.rb
112
95
  - shotstack.gemspec
113
- homepage: https://openapi-generator.tech
96
+ homepage: https://shotstack.io
114
97
  licenses:
115
- - Unlicense
98
+ - MIT
116
99
  metadata: {}
117
100
  post_install_message:
118
101
  rdoc_options: []
@@ -122,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
105
  requirements:
123
106
  - - ">="
124
107
  - !ruby/object:Gem::Version
125
- version: '1.9'
108
+ version: '2.4'
126
109
  required_rubygems_version: !ruby/object:Gem::Requirement
127
110
  requirements:
128
111
  - - ">="
@@ -133,5 +116,5 @@ rubyforge_project:
133
116
  rubygems_version: 2.7.6
134
117
  signing_key:
135
118
  specification_version: 4
136
- summary: Shotstack Ruby Gem
119
+ summary: Shotstack SDK Ruby Gem
137
120
  test_files: []