Skip to content

Commit

Permalink
Merge pull request #6 from shotstack/slide-carousel-blur-docs-updates
Browse files Browse the repository at this point in the history
Add new slide and carousel transitions, blur effect and docs update
  • Loading branch information
jeffski authored Oct 31, 2020
2 parents 9b055fd + 91d5b27 commit e325d6b
Show file tree
Hide file tree
Showing 16 changed files with 313 additions and 80 deletions.
53 changes: 35 additions & 18 deletions src/Api/EndpointsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ public function getConfig()
/**
* Operation getRender
*
* Get Render Status
*
* @param string $id The id of the timeline render task in UUID format (required)
*
* @throws \Shotstack\Client\ApiException on non-2xx response
Expand All @@ -133,6 +135,8 @@ public function getRender($id)
/**
* Operation getRenderWithHttpInfo
*
* Get Render Status
*
* @param string $id The id of the timeline render task in UUID format (required)
*
* @throws \Shotstack\Client\ApiException on non-2xx response
Expand Down Expand Up @@ -219,7 +223,7 @@ public function getRenderWithHttpInfo($id)
/**
* Operation getRenderAsync
*
*
* Get Render Status
*
* @param string $id The id of the timeline render task in UUID format (required)
*
Expand All @@ -239,7 +243,7 @@ function ($response) {
/**
* Operation getRenderAsyncWithHttpInfo
*
*
* Get Render Status
*
* @param string $id The id of the timeline render task in UUID format (required)
*
Expand Down Expand Up @@ -395,30 +399,36 @@ protected function getRenderRequest($id)
/**
* Operation postRender
*
* @param \Shotstack\Client\Model\Edit $edit edit (required)
* Render Video
*
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
*
* @throws \Shotstack\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Shotstack\Client\Model\QueuedResponse
*/
public function postRender($edit)
public function postRender($edit, $x_api_queue_id = null)
{
list($response) = $this->postRenderWithHttpInfo($edit);
list($response) = $this->postRenderWithHttpInfo($edit, $x_api_queue_id);
return $response;
}

/**
* Operation postRenderWithHttpInfo
*
* @param \Shotstack\Client\Model\Edit $edit (required)
* Render Video
*
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
*
* @throws \Shotstack\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Shotstack\Client\Model\QueuedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function postRenderWithHttpInfo($edit)
public function postRenderWithHttpInfo($edit, $x_api_queue_id = null)
{
$request = $this->postRenderRequest($edit);
$request = $this->postRenderRequest($edit, $x_api_queue_id);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -496,16 +506,17 @@ public function postRenderWithHttpInfo($edit)
/**
* Operation postRenderAsync
*
*
* Render Video
*
* @param \Shotstack\Client\Model\Edit $edit (required)
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function postRenderAsync($edit)
public function postRenderAsync($edit, $x_api_queue_id = null)
{
return $this->postRenderAsyncWithHttpInfo($edit)
return $this->postRenderAsyncWithHttpInfo($edit, $x_api_queue_id)
->then(
function ($response) {
return $response[0];
Expand All @@ -516,17 +527,18 @@ function ($response) {
/**
* Operation postRenderAsyncWithHttpInfo
*
*
* Render Video
*
* @param \Shotstack\Client\Model\Edit $edit (required)
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function postRenderAsyncWithHttpInfo($edit)
public function postRenderAsyncWithHttpInfo($edit, $x_api_queue_id = null)
{
$returnType = '\Shotstack\Client\Model\QueuedResponse';
$request = $this->postRenderRequest($edit);
$request = $this->postRenderRequest($edit, $x_api_queue_id);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -565,12 +577,13 @@ function ($exception) {
/**
* Create request for operation 'postRender'
*
* @param \Shotstack\Client\Model\Edit $edit (required)
* @param \Shotstack\Client\Model\Edit $edit The video edit specified using JSON. (required)
* @param string $x_api_queue_id The id of a dedicated queue (enterprise customers only). (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function postRenderRequest($edit)
protected function postRenderRequest($edit, $x_api_queue_id = null)
{
// verify the required parameter 'edit' is set
if ($edit === null || (is_array($edit) && count($edit) === 0)) {
Expand All @@ -586,6 +599,10 @@ protected function postRenderRequest($edit)
$httpBody = '';
$multipart = false;

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


// body params
Expand Down
4 changes: 2 additions & 2 deletions src/Model/AudioAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function __construct(array $data = null)
$this->container['type'] = isset($data['type']) ? $data['type'] : 'audio';
$this->container['src'] = isset($data['src']) ? $data['src'] : null;
$this->container['trim'] = isset($data['trim']) ? $data['trim'] : null;
$this->container['volume'] = isset($data['volume']) ? $data['volume'] : null;
$this->container['volume'] = isset($data['volume']) ? $data['volume'] : 1;
}

/**
Expand Down Expand Up @@ -242,7 +242,7 @@ public function getType()
/**
* Sets type
*
* @param string $type The type of asset - set to <b>audio</b> for audio assets.
* @param string $type The type of asset - set to `audio` for audio assets.
*
* @return $this
*/
Expand Down
10 changes: 6 additions & 4 deletions src/Model/Clip.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public function getModelName()
const EFFECT_SLIDE_RIGHT = 'slideRight';
const EFFECT_SLIDE_UP = 'slideUp';
const EFFECT_SLIDE_DOWN = 'slideDown';
const FILTER_BLUR = 'blur';
const FILTER_BOOST = 'boost';
const FILTER_CONTRAST = 'contrast';
const FILTER_DARKEN = 'darken';
Expand Down Expand Up @@ -298,6 +299,7 @@ public function getEffectAllowableValues()
public function getFilterAllowableValues()
{
return [
self::FILTER_BLUR,
self::FILTER_BOOST,
self::FILTER_CONTRAST,
self::FILTER_DARKEN,
Expand Down Expand Up @@ -334,7 +336,7 @@ public function __construct(array $data = null)
$this->container['transition'] = isset($data['transition']) ? $data['transition'] : null;
$this->container['effect'] = isset($data['effect']) ? $data['effect'] : null;
$this->container['filter'] = isset($data['filter']) ? $data['filter'] : null;
$this->container['opacity'] = isset($data['opacity']) ? $data['opacity'] : null;
$this->container['opacity'] = isset($data['opacity']) ? $data['opacity'] : 1;
}

/**
Expand Down Expand Up @@ -544,7 +546,7 @@ public function getPosition()
/**
* Sets position
*
* @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.
* @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>
*
* @return $this
*/
Expand Down Expand Up @@ -625,7 +627,7 @@ public function getEffect()
/**
* Sets effect
*
* @param string|null $effect A motion effect to apply to the Clip.
* @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>
*
* @return $this
*/
Expand Down Expand Up @@ -658,7 +660,7 @@ public function getFilter()
/**
* Sets filter
*
* @param string|null $filter A filter effect to apply to the Clip.
* @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>
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/HtmlAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public function getType()
/**
* Sets type
*
* @param string $type The type of asset - set to <b>html</b> for HTML.
* @param string $type The type of asset - set to `html` for HTML.
*
* @return $this
*/
Expand Down Expand Up @@ -441,7 +441,7 @@ public function getPosition()
/**
* Sets position
*
* @param string|null $position Place the HTML in one of nine predefined positions within the HTML area.
* @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>
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/ImageAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function getType()
/**
* Sets type
*
* @param string $type The type of asset - set to <b>image</b> for images.
* @param string $type The type of asset - set to `image` for images.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/LumaAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function getType()
/**
* Sets type
*
* @param string $type The type of asset - set to <b>luma</b> for luma mattes.
* @param string $type The type of asset - set to `luma` for luma mattes.
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Offset.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->container['x'] = isset($data['x']) ? $data['x'] : null;
$this->container['y'] = isset($data['y']) ? $data['y'] : null;
$this->container['x'] = isset($data['x']) ? $data['x'] : 0;
$this->container['y'] = isset($data['y']) ? $data['y'] : 0;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Model/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ public function getModelName()
}

const FORMAT_MP4 = 'mp4';
const FORMAT_WEBM = 'webm';
const FORMAT_GIF = 'gif';
const RESOLUTION_PREVIEW = 'preview';
const RESOLUTION_MOBILE = 'mobile';
Expand All @@ -212,7 +211,6 @@ public function getFormatAllowableValues()
{
return [
self::FORMAT_MP4,
self::FORMAT_WEBM,
self::FORMAT_GIF,
];
}
Expand Down Expand Up @@ -362,7 +360,7 @@ public function getFormat()
/**
* Sets format
*
* @param string $format `mp4`, `webm` video or animated `gif`
* @param string $format `mp4` video or animated `gif`
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/QueuedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function getSuccess()
/**
* Sets success
*
* @param bool $success success
* @param bool $success `true` if successfully queued, else `false`.
*
* @return $this
*/
Expand All @@ -262,7 +262,7 @@ public function getMessage()
/**
* Sets message
*
* @param string $message message
* @param string $message `Created`, `Bad Request` or an error message.
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/QueuedResponseData.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function getMessage()
/**
* Sets message
*
* @param string $message Success response message
* @param string $message Success response message or error details.
*
* @return $this
*/
Expand All @@ -253,7 +253,7 @@ public function getId()
/**
* Sets id
*
* @param string $id The id of the render task in UUID format
* @param string $id The id of the render task in UUID format.
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Model/RenderResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function getSuccess()
/**
* Sets success
*
* @param bool $success success
* @param bool $success `true` if status available, else `false`.
*
* @return $this
*/
Expand All @@ -262,7 +262,7 @@ public function getMessage()
/**
* Sets message
*
* @param string $message message
* @param string $message `OK` or an error message.
*
* @return $this
*/
Expand Down
Loading

0 comments on commit e325d6b

Please sign in to comment.