Skip to content

Commit e325d6b

Browse files
authored
Merge pull request #6 from shotstack/slide-carousel-blur-docs-updates
Add new slide and carousel transitions, blur effect and docs update
2 parents 9b055fd + 91d5b27 commit e325d6b

16 files changed

+313
-80
lines changed

src/Api/EndpointsApi.php

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public function getConfig()
118118
/**
119119
* Operation getRender
120120
*
121+
* Get Render Status
122+
*
121123
* @param string $id The id of the timeline render task in UUID format (required)
122124
*
123125
* @throws \Shotstack\Client\ApiException on non-2xx response
@@ -133,6 +135,8 @@ public function getRender($id)
133135
/**
134136
* Operation getRenderWithHttpInfo
135137
*
138+
* Get Render Status
139+
*
136140
* @param string $id The id of the timeline render task in UUID format (required)
137141
*
138142
* @throws \Shotstack\Client\ApiException on non-2xx response
@@ -219,7 +223,7 @@ public function getRenderWithHttpInfo($id)
219223
/**
220224
* Operation getRenderAsync
221225
*
222-
*
226+
* Get Render Status
223227
*
224228
* @param string $id The id of the timeline render task in UUID format (required)
225229
*
@@ -239,7 +243,7 @@ function ($response) {
239243
/**
240244
* Operation getRenderAsyncWithHttpInfo
241245
*
242-
*
246+
* Get Render Status
243247
*
244248
* @param string $id The id of the timeline render task in UUID format (required)
245249
*
@@ -395,30 +399,36 @@ protected function getRenderRequest($id)
395399
/**
396400
* Operation postRender
397401
*
398-
* @param \Shotstack\Client\Model\Edit $edit edit (required)
402+
* Render Video
403+
*
404+
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
405+
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
399406
*
400407
* @throws \Shotstack\Client\ApiException on non-2xx response
401408
* @throws \InvalidArgumentException
402409
* @return \Shotstack\Client\Model\QueuedResponse
403410
*/
404-
public function postRender($edit)
411+
public function postRender($edit, $x_api_queue_id = null)
405412
{
406-
list($response) = $this->postRenderWithHttpInfo($edit);
413+
list($response) = $this->postRenderWithHttpInfo($edit, $x_api_queue_id);
407414
return $response;
408415
}
409416

410417
/**
411418
* Operation postRenderWithHttpInfo
412419
*
413-
* @param \Shotstack\Client\Model\Edit $edit (required)
420+
* Render Video
421+
*
422+
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
423+
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
414424
*
415425
* @throws \Shotstack\Client\ApiException on non-2xx response
416426
* @throws \InvalidArgumentException
417427
* @return array of \Shotstack\Client\Model\QueuedResponse, HTTP status code, HTTP response headers (array of strings)
418428
*/
419-
public function postRenderWithHttpInfo($edit)
429+
public function postRenderWithHttpInfo($edit, $x_api_queue_id = null)
420430
{
421-
$request = $this->postRenderRequest($edit);
431+
$request = $this->postRenderRequest($edit, $x_api_queue_id);
422432

423433
try {
424434
$options = $this->createHttpClientOption();
@@ -496,16 +506,17 @@ public function postRenderWithHttpInfo($edit)
496506
/**
497507
* Operation postRenderAsync
498508
*
499-
*
509+
* Render Video
500510
*
501-
* @param \Shotstack\Client\Model\Edit $edit (required)
511+
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
512+
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
502513
*
503514
* @throws \InvalidArgumentException
504515
* @return \GuzzleHttp\Promise\PromiseInterface
505516
*/
506-
public function postRenderAsync($edit)
517+
public function postRenderAsync($edit, $x_api_queue_id = null)
507518
{
508-
return $this->postRenderAsyncWithHttpInfo($edit)
519+
return $this->postRenderAsyncWithHttpInfo($edit, $x_api_queue_id)
509520
->then(
510521
function ($response) {
511522
return $response[0];
@@ -516,17 +527,18 @@ function ($response) {
516527
/**
517528
* Operation postRenderAsyncWithHttpInfo
518529
*
519-
*
530+
* Render Video
520531
*
521-
* @param \Shotstack\Client\Model\Edit $edit (required)
532+
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
533+
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
522534
*
523535
* @throws \InvalidArgumentException
524536
* @return \GuzzleHttp\Promise\PromiseInterface
525537
*/
526-
public function postRenderAsyncWithHttpInfo($edit)
538+
public function postRenderAsyncWithHttpInfo($edit, $x_api_queue_id = null)
527539
{
528540
$returnType = '\Shotstack\Client\Model\QueuedResponse';
529-
$request = $this->postRenderRequest($edit);
541+
$request = $this->postRenderRequest($edit, $x_api_queue_id);
530542

531543
return $this->client
532544
->sendAsync($request, $this->createHttpClientOption())
@@ -565,12 +577,13 @@ function ($exception) {
565577
/**
566578
* Create request for operation 'postRender'
567579
*
568-
* @param \Shotstack\Client\Model\Edit $edit (required)
580+
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
581+
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
569582
*
570583
* @throws \InvalidArgumentException
571584
* @return \GuzzleHttp\Psr7\Request
572585
*/
573-
protected function postRenderRequest($edit)
586+
protected function postRenderRequest($edit, $x_api_queue_id = null)
574587
{
575588
// verify the required parameter 'edit' is set
576589
if ($edit === null || (is_array($edit) && count($edit) === 0)) {
@@ -586,6 +599,10 @@ protected function postRenderRequest($edit)
586599
$httpBody = '';
587600
$multipart = false;
588601

602+
// header params
603+
if ($x_api_queue_id !== null) {
604+
$headerParams['x-api-queue-id'] = ObjectSerializer::toHeaderValue($x_api_queue_id);
605+
}
589606

590607

591608
// body params

src/Model/AudioAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function __construct(array $data = null)
196196
$this->container['type'] = isset($data['type']) ? $data['type'] : 'audio';
197197
$this->container['src'] = isset($data['src']) ? $data['src'] : null;
198198
$this->container['trim'] = isset($data['trim']) ? $data['trim'] : null;
199-
$this->container['volume'] = isset($data['volume']) ? $data['volume'] : null;
199+
$this->container['volume'] = isset($data['volume']) ? $data['volume'] : 1;
200200
}
201201

202202
/**
@@ -242,7 +242,7 @@ public function getType()
242242
/**
243243
* Sets type
244244
*
245-
* @param string $type The type of asset - set to <b>audio</b> for audio assets.
245+
* @param string $type The type of asset - set to `audio` for audio assets.
246246
*
247247
* @return $this
248248
*/

src/Model/Clip.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ public function getModelName()
228228
const EFFECT_SLIDE_RIGHT = 'slideRight';
229229
const EFFECT_SLIDE_UP = 'slideUp';
230230
const EFFECT_SLIDE_DOWN = 'slideDown';
231+
const FILTER_BLUR = 'blur';
231232
const FILTER_BOOST = 'boost';
232233
const FILTER_CONTRAST = 'contrast';
233234
const FILTER_DARKEN = 'darken';
@@ -298,6 +299,7 @@ public function getEffectAllowableValues()
298299
public function getFilterAllowableValues()
299300
{
300301
return [
302+
self::FILTER_BLUR,
301303
self::FILTER_BOOST,
302304
self::FILTER_CONTRAST,
303305
self::FILTER_DARKEN,
@@ -334,7 +336,7 @@ public function __construct(array $data = null)
334336
$this->container['transition'] = isset($data['transition']) ? $data['transition'] : null;
335337
$this->container['effect'] = isset($data['effect']) ? $data['effect'] : null;
336338
$this->container['filter'] = isset($data['filter']) ? $data['filter'] : null;
337-
$this->container['opacity'] = isset($data['opacity']) ? $data['opacity'] : null;
339+
$this->container['opacity'] = isset($data['opacity']) ? $data['opacity'] : 1;
338340
}
339341

340342
/**
@@ -544,7 +546,7 @@ public function getPosition()
544546
/**
545547
* Sets position
546548
*
547-
* @param string|null $position Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position.
549+
* @param string|null $position Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>
548550
*
549551
* @return $this
550552
*/
@@ -625,7 +627,7 @@ public function getEffect()
625627
/**
626628
* Sets effect
627629
*
628-
* @param string|null $effect A motion effect to apply to the Clip.
630+
* @param string|null $effect A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul>
629631
*
630632
* @return $this
631633
*/
@@ -658,7 +660,7 @@ public function getFilter()
658660
/**
659661
* Sets filter
660662
*
661-
* @param string|null $filter A filter effect to apply to the Clip.
663+
* @param string|null $filter A filter effect to apply to the Clip. <ul> <li>`blur` - blurs the image or video</li> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`invert` - invert colors</li> </ul>
662664
*
663665
* @return $this
664666
*/

src/Model/HtmlAsset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public function getType()
297297
/**
298298
* Sets type
299299
*
300-
* @param string $type The type of asset - set to <b>html</b> for HTML.
300+
* @param string $type The type of asset - set to `html` for HTML.
301301
*
302302
* @return $this
303303
*/
@@ -441,7 +441,7 @@ public function getPosition()
441441
/**
442442
* Sets position
443443
*
444-
* @param string|null $position Place the HTML in one of nine predefined positions within the HTML area.
444+
* @param string|null $position Place the HTML in one of nine predefined positions within the HTML area. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>
445445
*
446446
* @return $this
447447
*/

src/Model/ImageAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public function getType()
230230
/**
231231
* Sets type
232232
*
233-
* @param string $type The type of asset - set to <b>image</b> for images.
233+
* @param string $type The type of asset - set to `image` for images.
234234
*
235235
* @return $this
236236
*/

src/Model/LumaAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function getType()
236236
/**
237237
* Sets type
238238
*
239-
* @param string $type The type of asset - set to <b>luma</b> for luma mattes.
239+
* @param string $type The type of asset - set to `luma` for luma mattes.
240240
*
241241
* @return $this
242242
*/

src/Model/Offset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ public function getModelName()
183183
*/
184184
public function __construct(array $data = null)
185185
{
186-
$this->container['x'] = isset($data['x']) ? $data['x'] : null;
187-
$this->container['y'] = isset($data['y']) ? $data['y'] : null;
186+
$this->container['x'] = isset($data['x']) ? $data['x'] : 0;
187+
$this->container['y'] = isset($data['y']) ? $data['y'] : 0;
188188
}
189189

190190
/**

src/Model/Output.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public function getModelName()
185185
}
186186

187187
const FORMAT_MP4 = 'mp4';
188-
const FORMAT_WEBM = 'webm';
189188
const FORMAT_GIF = 'gif';
190189
const RESOLUTION_PREVIEW = 'preview';
191190
const RESOLUTION_MOBILE = 'mobile';
@@ -212,7 +211,6 @@ public function getFormatAllowableValues()
212211
{
213212
return [
214213
self::FORMAT_MP4,
215-
self::FORMAT_WEBM,
216214
self::FORMAT_GIF,
217215
];
218216
}
@@ -362,7 +360,7 @@ public function getFormat()
362360
/**
363361
* Sets format
364362
*
365-
* @param string $format `mp4`, `webm` video or animated `gif`
363+
* @param string $format `mp4` video or animated `gif`
366364
*
367365
* @return $this
368366
*/

src/Model/QueuedResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function getSuccess()
238238
/**
239239
* Sets success
240240
*
241-
* @param bool $success success
241+
* @param bool $success `true` if successfully queued, else `false`.
242242
*
243243
* @return $this
244244
*/
@@ -262,7 +262,7 @@ public function getMessage()
262262
/**
263263
* Sets message
264264
*
265-
* @param string $message message
265+
* @param string $message `Created`, `Bad Request` or an error message.
266266
*
267267
* @return $this
268268
*/

src/Model/QueuedResponseData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public function getMessage()
229229
/**
230230
* Sets message
231231
*
232-
* @param string $message Success response message
232+
* @param string $message Success response message or error details.
233233
*
234234
* @return $this
235235
*/
@@ -253,7 +253,7 @@ public function getId()
253253
/**
254254
* Sets id
255255
*
256-
* @param string $id The id of the render task in UUID format
256+
* @param string $id The id of the render task in UUID format.
257257
*
258258
* @return $this
259259
*/

0 commit comments

Comments
 (0)