Skip to content

Commit 6bc9a81

Browse files
author
Jay Turnbull
authored
Merge pull request #25 from shotstack/add-templates
Add Templates to SDK
2 parents c19c48d + 95c5e6f commit 6bc9a81

53 files changed

Lines changed: 5341 additions & 226 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Api/EditApi.php

Lines changed: 1785 additions & 168 deletions
Large diffs are not rendered by default.

src/Api/ServeApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Shotstack
1414
*
15-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
15+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1616
*
1717
* The version of the OpenAPI document: v1
1818
* Generated by: https://openapi-generator.tech

src/ApiException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Shotstack
1414
*
15-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
15+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1616
*
1717
* The version of the OpenAPI document: v1
1818
* Generated by: https://openapi-generator.tech

src/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Shotstack
1414
*
15-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
15+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1616
*
1717
* The version of the OpenAPI document: v1
1818
* Generated by: https://openapi-generator.tech

src/HeaderSelector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* Shotstack
1414
*
15-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
15+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1616
*
1717
* The version of the OpenAPI document: v1
1818
* Generated by: https://openapi-generator.tech

src/Model/Asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Shotstack
1515
*
16-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
16+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1717
*
1818
* The version of the OpenAPI document: v1
1919
* Generated by: https://openapi-generator.tech

src/Model/AssetRenderResponse.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Shotstack
1515
*
16-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
16+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1717
*
1818
* The version of the OpenAPI document: v1
1919
* Generated by: https://openapi-generator.tech
@@ -191,6 +191,9 @@ public function listInvalidProperties()
191191
{
192192
$invalidProperties = [];
193193

194+
if ($this->container['data'] === null) {
195+
$invalidProperties[] = "'data' can't be null";
196+
}
194197
return $invalidProperties;
195198
}
196199

src/Model/AssetResponse.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Shotstack
1515
*
16-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
16+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1717
*
1818
* The version of the OpenAPI document: v1
1919
* Generated by: https://openapi-generator.tech
@@ -191,6 +191,9 @@ public function listInvalidProperties()
191191
{
192192
$invalidProperties = [];
193193

194+
if ($this->container['data'] === null) {
195+
$invalidProperties[] = "'data' can't be null";
196+
}
194197
return $invalidProperties;
195198
}
196199

src/Model/AssetResponseAttributes.php

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Shotstack
1515
*
16-
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
16+
* Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
1717
*
1818
* The version of the OpenAPI document: v1
1919
* Generated by: https://openapi-generator.tech
@@ -64,6 +64,7 @@ class AssetResponseAttributes implements ModelInterface, ArrayAccess, \JsonSeria
6464
'owner' => 'string',
6565
'region' => 'string',
6666
'render_id' => 'string',
67+
'provider_id' => 'string',
6768
'filename' => 'string',
6869
'url' => 'string',
6970
'status' => 'string',
@@ -83,6 +84,7 @@ class AssetResponseAttributes implements ModelInterface, ArrayAccess, \JsonSeria
8384
'owner' => null,
8485
'region' => null,
8586
'render_id' => null,
87+
'provider_id' => null,
8688
'filename' => null,
8789
'url' => null,
8890
'status' => null,
@@ -121,6 +123,7 @@ public static function openAPIFormats()
121123
'owner' => 'owner',
122124
'region' => 'region',
123125
'render_id' => 'renderId',
126+
'provider_id' => 'providerId',
124127
'filename' => 'filename',
125128
'url' => 'url',
126129
'status' => 'status',
@@ -138,6 +141,7 @@ public static function openAPIFormats()
138141
'owner' => 'setOwner',
139142
'region' => 'setRegion',
140143
'render_id' => 'setRenderId',
144+
'provider_id' => 'setProviderId',
141145
'filename' => 'setFilename',
142146
'url' => 'setUrl',
143147
'status' => 'setStatus',
@@ -155,6 +159,7 @@ public static function openAPIFormats()
155159
'owner' => 'getOwner',
156160
'region' => 'getRegion',
157161
'render_id' => 'getRenderId',
162+
'provider_id' => 'getProviderId',
158163
'filename' => 'getFilename',
159164
'url' => 'getUrl',
160165
'status' => 'getStatus',
@@ -242,6 +247,7 @@ public function __construct(array $data = null)
242247
$this->container['owner'] = $data['owner'] ?? null;
243248
$this->container['region'] = $data['region'] ?? null;
244249
$this->container['render_id'] = $data['render_id'] ?? null;
250+
$this->container['provider_id'] = $data['provider_id'] ?? null;
245251
$this->container['filename'] = $data['filename'] ?? null;
246252
$this->container['url'] = $data['url'] ?? null;
247253
$this->container['status'] = $data['status'] ?? null;
@@ -258,6 +264,18 @@ public function listInvalidProperties()
258264
{
259265
$invalidProperties = [];
260266

267+
if ($this->container['id'] === null) {
268+
$invalidProperties[] = "'id' can't be null";
269+
}
270+
if ($this->container['owner'] === null) {
271+
$invalidProperties[] = "'owner' can't be null";
272+
}
273+
if ($this->container['filename'] === null) {
274+
$invalidProperties[] = "'filename' can't be null";
275+
}
276+
if ($this->container['status'] === null) {
277+
$invalidProperties[] = "'status' can't be null";
278+
}
261279
$allowedValues = $this->getStatusAllowableValues();
262280
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
263281
$invalidProperties[] = sprintf(
@@ -267,6 +285,12 @@ public function listInvalidProperties()
267285
);
268286
}
269287

288+
if ($this->container['created'] === null) {
289+
$invalidProperties[] = "'created' can't be null";
290+
}
291+
if ($this->container['updated'] === null) {
292+
$invalidProperties[] = "'updated' can't be null";
293+
}
270294
return $invalidProperties;
271295
}
272296

@@ -285,7 +309,7 @@ public function valid()
285309
/**
286310
* Gets id
287311
*
288-
* @return string|null
312+
* @return string
289313
*/
290314
public function getId()
291315
{
@@ -295,7 +319,7 @@ public function getId()
295319
/**
296320
* Sets id
297321
*
298-
* @param string|null $id The unique id of the hosted asset in UUID format.
322+
* @param string $id The unique id of the hosted asset in UUID format.
299323
*
300324
* @return self
301325
*/
@@ -309,7 +333,7 @@ public function setId($id)
309333
/**
310334
* Gets owner
311335
*
312-
* @return string|null
336+
* @return string
313337
*/
314338
public function getOwner()
315339
{
@@ -319,7 +343,7 @@ public function getOwner()
319343
/**
320344
* Sets owner
321345
*
322-
* @param string|null $owner The owner id of the render task.
346+
* @param string $owner The owner id of the render task.
323347
*
324348
* @return self
325349
*/
@@ -379,10 +403,34 @@ public function setRenderId($render_id)
379403
}
380404

381405
/**
382-
* Gets filename
406+
* Gets provider_id
383407
*
384408
* @return string|null
385409
*/
410+
public function getProviderId()
411+
{
412+
return $this->container['provider_id'];
413+
}
414+
415+
/**
416+
* Sets provider_id
417+
*
418+
* @param string|null $provider_id The third party id of an asset transferred to an external provider, i.e. Mux, YouTube or S3. If the provider is Shotstack, the providerID is the same as the asset id.
419+
*
420+
* @return self
421+
*/
422+
public function setProviderId($provider_id)
423+
{
424+
$this->container['provider_id'] = $provider_id;
425+
426+
return $this;
427+
}
428+
429+
/**
430+
* Gets filename
431+
*
432+
* @return string
433+
*/
386434
public function getFilename()
387435
{
388436
return $this->container['filename'];
@@ -391,7 +439,7 @@ public function getFilename()
391439
/**
392440
* Sets filename
393441
*
394-
* @param string|null $filename The asset file name.
442+
* @param string $filename The asset file name.
395443
*
396444
* @return self
397445
*/
@@ -429,7 +477,7 @@ public function setUrl($url)
429477
/**
430478
* Gets status
431479
*
432-
* @return string|null
480+
* @return string
433481
*/
434482
public function getStatus()
435483
{
@@ -439,14 +487,14 @@ public function getStatus()
439487
/**
440488
* Sets status
441489
*
442-
* @param string|null $status The status of the asset. <ul> <li>`importing` - the asset is being copied to the hosting service</li> <li>`ready` - the asset is ready to be served to users</li> <li>`failed` - the asset failed to copy or delete</li> <li>`deleted` - the asset has been deleted</li> </ul>
490+
* @param string $status The status of the asset. <ul> <li>`importing` - the asset is being copied to the hosting service</li> <li>`ready` - the asset is ready to be served to users</li> <li>`failed` - the asset failed to copy or delete</li> <li>`deleted` - the asset has been deleted</li> </ul>
443491
*
444492
* @return self
445493
*/
446494
public function setStatus($status)
447495
{
448496
$allowedValues = $this->getStatusAllowableValues();
449-
if (!is_null($status) && !in_array($status, $allowedValues, true)) {
497+
if (!in_array($status, $allowedValues, true)) {
450498
throw new \InvalidArgumentException(
451499
sprintf(
452500
"Invalid value '%s' for 'status', must be one of '%s'",
@@ -463,7 +511,7 @@ public function setStatus($status)
463511
/**
464512
* Gets created
465513
*
466-
* @return string|null
514+
* @return string
467515
*/
468516
public function getCreated()
469517
{
@@ -473,7 +521,7 @@ public function getCreated()
473521
/**
474522
* Sets created
475523
*
476-
* @param string|null $created The time the asset was created.
524+
* @param string $created The time the asset was created.
477525
*
478526
* @return self
479527
*/
@@ -487,7 +535,7 @@ public function setCreated($created)
487535
/**
488536
* Gets updated
489537
*
490-
* @return string|null
538+
* @return string
491539
*/
492540
public function getUpdated()
493541
{
@@ -497,7 +545,7 @@ public function getUpdated()
497545
/**
498546
* Sets updated
499547
*
500-
* @param string|null $updated The time the asset status was last updated.
548+
* @param string $updated The time the asset status was last updated.
501549
*
502550
* @return self
503551
*/

0 commit comments

Comments
 (0)