shotstack 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c25bb8f71fb1b0d993a60aa4028546375451f0978461b1c91ac0caf9b651df55
4
- data.tar.gz: cdeea3fed0658a006339aef975b40b94067d2e0d80c611cea9319fd304f5f1b8
3
+ metadata.gz: 991d9e463ec387c1f9b95ece6cd397a6435f6584f44082a8176ee129f9691cdc
4
+ data.tar.gz: 6ca22d52cae38255a0faa0eb62ca6e2a351e8c5f98852ee246b6f057dbafaab7
5
5
  SHA512:
6
- metadata.gz: 33c957198774b015ddcf9364efa98f1f104b883c02561f65acb946b790266943cac49f98178f5dbb774821c08f735c9be1f8918df30e9ff23f82f7a880ef3183
7
- data.tar.gz: c7edb8be614276130289c71bf100892ef32d124b8cd480704b83f5dd26fb5bbe1c3302af6ca50a514aaac8075ab57894f390d133d96703aed7610186832f3099
6
+ metadata.gz: 7932a40f77cdfcd9f2d6a698ef42929ce697ed68d4144c97c0a76dcc8f0c3d008eed0fb4e4582081b796f2e6767914e76f00b97c523c409c44c1447c40635cd2
7
+ data.tar.gz: f368b586aab6dfdaa9795edb4af23d06ef7fab69d29f691e4924e9048ea5457abea5cd60105e3e5b8e466f1df774f69e1cf157b0e6a5d619d31dc65934142046
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -19,7 +19,7 @@ module Shotstack
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Get the rendering status and details of a timeline by ID.
22
+ # Get the rendering status, video url and details of a timeline by ID.
23
23
  # @param id [String] The id of the timeline render task in UUID format
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [RenderResponse]
@@ -28,7 +28,7 @@ module Shotstack
28
28
  data
29
29
  end
30
30
 
31
- # Get the rendering status and details of a timeline by ID.
31
+ # Get the rendering status, video url and details of a timeline by ID.
32
32
  # @param id [String] The id of the timeline render task in UUID format
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(RenderResponse, Integer, Hash)>] RenderResponse data, response status code and response headers
@@ -49,26 +49,35 @@ module Shotstack
49
49
  local_var_path = '/render/{id}'.sub('{' + 'id' + '}', id.to_s)
50
50
 
51
51
  # query parameters
52
- query_params = {}
52
+ query_params = opts[:query_params] || {}
53
53
 
54
54
  # header parameters
55
- header_params = {}
55
+ header_params = opts[:header_params] || {}
56
56
  # HTTP header 'Accept' (if needed)
57
57
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
58
 
59
59
  # form parameters
60
- form_params = {}
60
+ form_params = opts[:form_params] || {}
61
61
 
62
62
  # http body (model)
63
- post_body = nil
64
- auth_names = ['DeveloperKey']
65
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
63
+ post_body = opts[:body]
64
+
65
+ # return_type
66
+ return_type = opts[:return_type] || 'RenderResponse'
67
+
68
+ # auth_names
69
+ auth_names = opts[:auth_names] || ['DeveloperKey']
70
+
71
+ new_options = opts.merge(
66
72
  :header_params => header_params,
67
73
  :query_params => query_params,
68
74
  :form_params => form_params,
69
75
  :body => post_body,
70
76
  :auth_names => auth_names,
71
- :return_type => 'RenderResponse')
77
+ :return_type => return_type
78
+ )
79
+
80
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
72
81
  if @api_client.config.debugging
73
82
  @api_client.config.logger.debug "API called: DefaultApi#get_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
83
  end
@@ -100,28 +109,37 @@ module Shotstack
100
109
  local_var_path = '/render'
101
110
 
102
111
  # query parameters
103
- query_params = {}
112
+ query_params = opts[:query_params] || {}
104
113
 
105
114
  # header parameters
106
- header_params = {}
115
+ header_params = opts[:header_params] || {}
107
116
  # HTTP header 'Accept' (if needed)
108
117
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
109
118
  # HTTP header 'Content-Type'
110
119
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
111
120
 
112
121
  # form parameters
113
- form_params = {}
122
+ form_params = opts[:form_params] || {}
114
123
 
115
124
  # http body (model)
116
- post_body = @api_client.object_to_http_body(edit)
117
- auth_names = ['DeveloperKey']
118
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
125
+ post_body = opts[:body] || @api_client.object_to_http_body(edit)
126
+
127
+ # return_type
128
+ return_type = opts[:return_type] || 'QueuedResponse'
129
+
130
+ # auth_names
131
+ auth_names = opts[:auth_names] || ['DeveloperKey']
132
+
133
+ new_options = opts.merge(
119
134
  :header_params => header_params,
120
135
  :query_params => query_params,
121
136
  :form_params => form_params,
122
137
  :body => post_body,
123
138
  :auth_names => auth_names,
124
- :return_type => 'QueuedResponse')
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
125
143
  if @api_client.config.debugging
126
144
  @api_client.config.logger.debug "API called: DefaultApi#post_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
145
  end
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -23,6 +23,9 @@ module Shotstack
23
23
  # The owner id of the render task
24
24
  attr_accessor :owner
25
25
 
26
+ # The URL of the final video. This will only be available if status is done.
27
+ attr_accessor :url
28
+
26
29
  attr_accessor :data
27
30
 
28
31
  # The time the render task was initially queued
@@ -59,6 +62,7 @@ module Shotstack
59
62
  :'status' => :'status',
60
63
  :'id' => :'id',
61
64
  :'owner' => :'owner',
65
+ :'url' => :'url',
62
66
  :'data' => :'data',
63
67
  :'created' => :'created',
64
68
  :'updated' => :'updated'
@@ -71,6 +75,7 @@ module Shotstack
71
75
  :'status' => :'String',
72
76
  :'id' => :'String',
73
77
  :'owner' => :'String',
78
+ :'url' => :'String',
74
79
  :'data' => :'Edit',
75
80
  :'created' => :'String',
76
81
  :'updated' => :'String'
@@ -104,6 +109,10 @@ module Shotstack
104
109
  self.owner = attributes[:'owner']
105
110
  end
106
111
 
112
+ if attributes.key?(:'url')
113
+ self.url = attributes[:'url']
114
+ end
115
+
107
116
  if attributes.key?(:'data')
108
117
  self.data = attributes[:'data']
109
118
  end
@@ -180,6 +189,7 @@ module Shotstack
180
189
  status == o.status &&
181
190
  id == o.id &&
182
191
  owner == o.owner &&
192
+ url == o.url &&
183
193
  data == o.data &&
184
194
  created == o.created &&
185
195
  updated == o.updated
@@ -194,7 +204,7 @@ module Shotstack
194
204
  # Calculates hash code according to all attributes.
195
205
  # @return [Integer] Hash code
196
206
  def hash
197
- [status, id, owner, data, created, updated].hash
207
+ [status, id, owner, url, data, created, updated].hash
198
208
  end
199
209
 
200
210
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -21,6 +21,28 @@ module Shotstack
21
21
  # The effect to apply to the audio file
22
22
  attr_accessor :effect
23
23
 
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
24
46
  # Attribute mapping from ruby-style variable name to JSON key.
25
47
  def self.attribute_map
26
48
  {
@@ -69,10 +91,6 @@ module Shotstack
69
91
  invalid_properties.push('invalid value for "src", src cannot be nil.')
70
92
  end
71
93
 
72
- if @effect.nil?
73
- invalid_properties.push('invalid value for "effect", effect cannot be nil.')
74
- end
75
-
76
94
  invalid_properties
77
95
  end
78
96
 
@@ -80,10 +98,21 @@ module Shotstack
80
98
  # @return true if the model is valid
81
99
  def valid?
82
100
  return false if @src.nil?
83
- return false if @effect.nil?
101
+ effect_validator = EnumAttributeValidator.new('String', ["fadeIn", "fadeOut", "fadeInFadeOut"])
102
+ return false unless effect_validator.valid?(@effect)
84
103
  true
85
104
  end
86
105
 
106
+ # Custom attribute writer method checking allowed values (enum).
107
+ # @param [Object] effect Object to be assigned
108
+ def effect=(effect)
109
+ validator = EnumAttributeValidator.new('String', ["fadeIn", "fadeOut", "fadeInFadeOut"])
110
+ unless validator.valid?(effect)
111
+ fail ArgumentError, "invalid value for \"effect\", must be one of #{validator.allowable_values}."
112
+ end
113
+ @effect = effect
114
+ end
115
+
87
116
  # Checks equality by comparing each attribute.
88
117
  # @param [Object] Object to be compared
89
118
  def ==(o)
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require_relative 'asset'
15
15
 
16
16
  module Shotstack
17
- # The TitleAsset clip type lets you create video titles from a text string and apply styling.
17
+ # The TitleAsset clip type lets you create video titles from a text string and apply styling.
18
18
  class TitleAsset < Asset
19
19
  # The type of asset - set to <b>title</b> for titles.
20
20
  attr_accessor :type
@@ -25,6 +25,9 @@ module Shotstack
25
25
  # Uses a preset to apply font properties and stylng to the title.
26
26
  attr_accessor :style
27
27
 
28
+ # Place the title in one of nine predefined positions of the viewport.
29
+ attr_accessor :position
30
+
28
31
  class EnumAttributeValidator
29
32
  attr_reader :datatype
30
33
  attr_reader :allowable_values
@@ -52,7 +55,8 @@ module Shotstack
52
55
  {
53
56
  :'type' => :'type',
54
57
  :'text' => :'text',
55
- :'style' => :'style'
58
+ :'style' => :'style',
59
+ :'position' => :'position'
56
60
  }
57
61
  end
58
62
 
@@ -61,7 +65,8 @@ module Shotstack
61
65
  {
62
66
  :'type' => :'String',
63
67
  :'text' => :'String',
64
- :'style' => :'String'
68
+ :'style' => :'String',
69
+ :'position' => :'String'
65
70
  }
66
71
  end
67
72
 
@@ -93,6 +98,12 @@ module Shotstack
93
98
  if attributes.key?(:'style')
94
99
  self.style = attributes[:'style']
95
100
  end
101
+
102
+ if attributes.key?(:'position')
103
+ self.position = attributes[:'position']
104
+ else
105
+ self.position = 'center'
106
+ end
96
107
  end
97
108
 
98
109
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -117,6 +128,8 @@ module Shotstack
117
128
  return false if @text.nil?
118
129
  style_validator = EnumAttributeValidator.new('String', ["minimal", "blockbuster", "vogue", "sketchy", "skinny"])
119
130
  return false unless style_validator.valid?(@style)
131
+ position_validator = EnumAttributeValidator.new('String', ["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"])
132
+ return false unless position_validator.valid?(@position)
120
133
  true
121
134
  end
122
135
 
@@ -130,6 +143,16 @@ module Shotstack
130
143
  @style = style
131
144
  end
132
145
 
146
+ # Custom attribute writer method checking allowed values (enum).
147
+ # @param [Object] position Object to be assigned
148
+ def position=(position)
149
+ validator = EnumAttributeValidator.new('String', ["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"])
150
+ unless validator.valid?(position)
151
+ fail ArgumentError, "invalid value for \"position\", must be one of #{validator.allowable_values}."
152
+ end
153
+ @position = position
154
+ end
155
+
133
156
  # Checks equality by comparing each attribute.
134
157
  # @param [Object] Object to be compared
135
158
  def ==(o)
@@ -137,7 +160,8 @@ module Shotstack
137
160
  self.class == o.class &&
138
161
  type == o.type &&
139
162
  text == o.text &&
140
- style == o.style
163
+ style == o.style &&
164
+ position == o.position
141
165
  end
142
166
 
143
167
  # @see the `==` method
@@ -149,7 +173,7 @@ module Shotstack
149
173
  # Calculates hash code according to all attributes.
150
174
  # @return [Integer] Hash code
151
175
  def hash
152
- [type, text, style].hash
176
+ [type, text, style, position].hash
153
177
  end
154
178
 
155
179
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
@@ -3,13 +3,13 @@
3
3
 
4
4
  #The Shotstack API is a video editing service that allows for the programatic creation of videos using JSON.
5
5
 
6
- OpenAPI spec version: v1
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.0.0-beta3
9
+ OpenAPI Generator version: 4.0.0
10
10
 
11
11
  =end
12
12
 
13
13
  module Shotstack
14
- VERSION = "0.0.10"
14
+ VERSION = '0.0.11'
15
15
  end
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.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-26 00:00:00.000000000 Z
11
+ date: 2019-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus