Skip to content

Commit dad7fb8

Browse files
authored
Merge pull request #9 from shotstack/july-updates
July 2021 Feature Update
2 parents 475b95e + 066356c commit dad7fb8

36 files changed

Lines changed: 2077 additions & 108 deletions

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shotstack-sdk",
3-
"version": "0.0.22",
3+
"version": "0.0.23",
44
"description": "Official Node SDK for the Shotstack Cloud Video Editing API",
55
"license": "MIT",
66
"main": "src/index.js",

‎src/ApiClient.js‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Shotstack
3-
* 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.
3+
* 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.gitbook.io/docs/guides/getting-started) 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>
44
*
55
* The version of the OpenAPI document: v1
66
*
@@ -626,7 +626,21 @@
626626
'description': "No description provided",
627627
'variables': {
628628
version: {
629-
'description': "No description provided",
629+
'description': "Set the stage to `v1` for production usage without watermarks. Set to `stage` to use the development sandbox.",
630+
'default_value': "v1",
631+
'enum_values': [
632+
"v1",
633+
"stage"
634+
]
635+
}
636+
}
637+
},
638+
{
639+
'url': "https://api.shotstack.io/serve/{version}",
640+
'description': "No description provided",
641+
'variables': {
642+
version: {
643+
'description': "Set the stage to `v1` for production usage. Set to `stage` to use the development sandbox.",
630644
'default_value': "v1",
631645
'enum_values': [
632646
"v1",

‎src/api/EditApi.js‎

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/**
2+
* Shotstack
3+
* 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.gitbook.io/docs/guides/getting-started) 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>
4+
*
5+
* The version of the OpenAPI document: v1
6+
*
7+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8+
* https://openapi-generator.tech
9+
*
10+
* OpenAPI Generator version: 5.0.0
11+
*
12+
* Do not edit the class manually.
13+
*
14+
*/
15+
16+
(function(root, factory) {
17+
if (typeof define === 'function' && define.amd) {
18+
// AMD. Register as an anonymous module.
19+
define(['ApiClient', 'model/Edit', 'model/QueuedResponse', 'model/RenderResponse'], factory);
20+
} else if (typeof module === 'object' && module.exports) {
21+
// CommonJS-like environments that support module.exports, like Node.
22+
module.exports = factory(require('../ApiClient'), require('../model/Edit'), require('../model/QueuedResponse'), require('../model/RenderResponse'));
23+
} else {
24+
// Browser globals (root is window)
25+
if (!root.ShotstackSdk) {
26+
root.ShotstackSdk = {};
27+
}
28+
root.ShotstackSdk.EditApi = factory(root.ShotstackSdk.ApiClient, root.ShotstackSdk.Edit, root.ShotstackSdk.QueuedResponse, root.ShotstackSdk.RenderResponse);
29+
}
30+
}(this, function(ApiClient, Edit, QueuedResponse, RenderResponse) {
31+
'use strict';
32+
33+
/**
34+
* Edit service.
35+
* @module api/EditApi
36+
* @version v1
37+
*/
38+
39+
/**
40+
* Constructs a new EditApi.
41+
* @alias module:api/EditApi
42+
* @class
43+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
44+
* default to {@link module:ApiClient#instance} if unspecified.
45+
*/
46+
var exports = function(apiClient) {
47+
this.apiClient = apiClient || ApiClient.instance;
48+
49+
50+
51+
/**
52+
* Get Render Status
53+
* Get the rendering status, temporary asset url and details of a render by ID. **base URL:** https://api.shotstack.io/{version}
54+
* @param {String} id The id of the timeline render task in UUID format
55+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RenderResponse} and HTTP response
56+
*/
57+
this.getRenderWithHttpInfo = function(id) {
58+
var postBody = null;
59+
// verify the required parameter 'id' is set
60+
if (id === undefined || id === null) {
61+
throw new Error("Missing the required parameter 'id' when calling getRender");
62+
}
63+
64+
var pathParams = {
65+
'id': id
66+
};
67+
var queryParams = {
68+
};
69+
var collectionQueryParams = {
70+
};
71+
var headerParams = {
72+
};
73+
var formParams = {
74+
};
75+
76+
var authNames = ['DeveloperKey'];
77+
var contentTypes = [];
78+
var accepts = ['application/json'];
79+
var returnType = RenderResponse;
80+
return this.apiClient.callApi(
81+
'/render/{id}', 'GET',
82+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
83+
authNames, contentTypes, accepts, returnType, null
84+
);
85+
}
86+
87+
/**
88+
* Get Render Status
89+
* Get the rendering status, temporary asset url and details of a render by ID. **base URL:** https://api.shotstack.io/{version}
90+
* @param {String} id The id of the timeline render task in UUID format
91+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RenderResponse}
92+
*/
93+
this.getRender = function(id) {
94+
return this.getRenderWithHttpInfo(id)
95+
.then(function(response_and_data) {
96+
return response_and_data.data;
97+
});
98+
}
99+
100+
101+
/**
102+
* Render Asset
103+
* Queue and render the contents of a timeline as a video, image or audio file.
104+
* @param {module:model/Edit} edit The video, image or audio edit specified using JSON. **base URL:** https://api.shotstack.io/{version}
105+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/QueuedResponse} and HTTP response
106+
*/
107+
this.postRenderWithHttpInfo = function(edit) {
108+
var postBody = edit;
109+
// verify the required parameter 'edit' is set
110+
if (edit === undefined || edit === null) {
111+
throw new Error("Missing the required parameter 'edit' when calling postRender");
112+
}
113+
114+
var pathParams = {
115+
};
116+
var queryParams = {
117+
};
118+
var collectionQueryParams = {
119+
};
120+
var headerParams = {
121+
};
122+
var formParams = {
123+
};
124+
125+
var authNames = ['DeveloperKey'];
126+
var contentTypes = ['application/json'];
127+
var accepts = ['application/json'];
128+
var returnType = QueuedResponse;
129+
return this.apiClient.callApi(
130+
'/render', 'POST',
131+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
132+
authNames, contentTypes, accepts, returnType, null
133+
);
134+
}
135+
136+
/**
137+
* Render Asset
138+
* Queue and render the contents of a timeline as a video, image or audio file.
139+
* @param {module:model/Edit} edit The video, image or audio edit specified using JSON. **base URL:** https://api.shotstack.io/{version}
140+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/QueuedResponse}
141+
*/
142+
this.postRender = function(edit) {
143+
return this.postRenderWithHttpInfo(edit)
144+
.then(function(response_and_data) {
145+
return response_and_data.data;
146+
});
147+
}
148+
};
149+
150+
return exports;
151+
}));

‎src/api/ServeApi.js‎

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
/**
2+
* Shotstack
3+
* 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.gitbook.io/docs/guides/getting-started) 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>
4+
*
5+
* The version of the OpenAPI document: v1
6+
*
7+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8+
* https://openapi-generator.tech
9+
*
10+
* OpenAPI Generator version: 5.0.0
11+
*
12+
* Do not edit the class manually.
13+
*
14+
*/
15+
16+
(function(root, factory) {
17+
if (typeof define === 'function' && define.amd) {
18+
// AMD. Register as an anonymous module.
19+
define(['ApiClient', 'model/AssetRenderResponse', 'model/AssetResponse'], factory);
20+
} else if (typeof module === 'object' && module.exports) {
21+
// CommonJS-like environments that support module.exports, like Node.
22+
module.exports = factory(require('../ApiClient'), require('../model/AssetRenderResponse'), require('../model/AssetResponse'));
23+
} else {
24+
// Browser globals (root is window)
25+
if (!root.ShotstackSdk) {
26+
root.ShotstackSdk = {};
27+
}
28+
root.ShotstackSdk.ServeApi = factory(root.ShotstackSdk.ApiClient, root.ShotstackSdk.AssetRenderResponse, root.ShotstackSdk.AssetResponse);
29+
}
30+
}(this, function(ApiClient, AssetRenderResponse, AssetResponse) {
31+
'use strict';
32+
33+
/**
34+
* Serve service.
35+
* @module api/ServeApi
36+
* @version v1
37+
*/
38+
39+
/**
40+
* Constructs a new ServeApi.
41+
* @alias module:api/ServeApi
42+
* @class
43+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
44+
* default to {@link module:ApiClient#instance} if unspecified.
45+
*/
46+
var exports = function(apiClient) {
47+
this.apiClient = apiClient || ApiClient.instance;
48+
49+
50+
51+
/**
52+
* Delete Asset
53+
* Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **base URL:** https://api.shotstack.io/serve/{version}
54+
* @param {String} id The id of the asset in UUID format
55+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
56+
*/
57+
this.deleteAssetWithHttpInfo = function(id) {
58+
var postBody = null;
59+
// verify the required parameter 'id' is set
60+
if (id === undefined || id === null) {
61+
throw new Error("Missing the required parameter 'id' when calling deleteAsset");
62+
}
63+
64+
var pathParams = {
65+
'id': id
66+
};
67+
var queryParams = {
68+
};
69+
var collectionQueryParams = {
70+
};
71+
var headerParams = {
72+
};
73+
var formParams = {
74+
};
75+
76+
var authNames = ['DeveloperKey'];
77+
var contentTypes = [];
78+
var accepts = [];
79+
var returnType = null;
80+
return this.apiClient.callApi(
81+
'/assets/{id}', 'DELETE',
82+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
83+
authNames, contentTypes, accepts, returnType, null
84+
);
85+
}
86+
87+
/**
88+
* Delete Asset
89+
* Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **base URL:** https://api.shotstack.io/serve/{version}
90+
* @param {String} id The id of the asset in UUID format
91+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
92+
*/
93+
this.deleteAsset = function(id) {
94+
return this.deleteAssetWithHttpInfo(id)
95+
.then(function(response_and_data) {
96+
return response_and_data.data;
97+
});
98+
}
99+
100+
101+
/**
102+
* Get Asset
103+
* The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **base URL:** https://api.shotstack.io/serve/{version}
104+
* @param {String} id The id of the asset in UUID format
105+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AssetResponse} and HTTP response
106+
*/
107+
this.getAssetWithHttpInfo = function(id) {
108+
var postBody = null;
109+
// verify the required parameter 'id' is set
110+
if (id === undefined || id === null) {
111+
throw new Error("Missing the required parameter 'id' when calling getAsset");
112+
}
113+
114+
var pathParams = {
115+
'id': id
116+
};
117+
var queryParams = {
118+
};
119+
var collectionQueryParams = {
120+
};
121+
var headerParams = {
122+
};
123+
var formParams = {
124+
};
125+
126+
var authNames = ['DeveloperKey'];
127+
var contentTypes = [];
128+
var accepts = ['application/json'];
129+
var returnType = AssetResponse;
130+
return this.apiClient.callApi(
131+
'/assets/{id}', 'GET',
132+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
133+
authNames, contentTypes, accepts, returnType, null
134+
);
135+
}
136+
137+
/**
138+
* Get Asset
139+
* The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **base URL:** https://api.shotstack.io/serve/{version}
140+
* @param {String} id The id of the asset in UUID format
141+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AssetResponse}
142+
*/
143+
this.getAsset = function(id) {
144+
return this.getAssetWithHttpInfo(id)
145+
.then(function(response_and_data) {
146+
return response_and_data.data;
147+
});
148+
}
149+
150+
151+
/**
152+
* Get Asset by Render ID
153+
* A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **base URL:** https://api.shotstack.io/serve/{version}
154+
* @param {String} id The render id associated with the asset in UUID format
155+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AssetRenderResponse} and HTTP response
156+
*/
157+
this.getAssetByRenderIdWithHttpInfo = function(id) {
158+
var postBody = null;
159+
// verify the required parameter 'id' is set
160+
if (id === undefined || id === null) {
161+
throw new Error("Missing the required parameter 'id' when calling getAssetByRenderId");
162+
}
163+
164+
var pathParams = {
165+
'id': id
166+
};
167+
var queryParams = {
168+
};
169+
var collectionQueryParams = {
170+
};
171+
var headerParams = {
172+
};
173+
var formParams = {
174+
};
175+
176+
var authNames = ['DeveloperKey'];
177+
var contentTypes = [];
178+
var accepts = ['application/json'];
179+
var returnType = AssetRenderResponse;
180+
return this.apiClient.callApi(
181+
'/assets/render/{id}', 'GET',
182+
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
183+
authNames, contentTypes, accepts, returnType, null
184+
);
185+
}
186+
187+
/**
188+
* Get Asset by Render ID
189+
* A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **base URL:** https://api.shotstack.io/serve/{version}
190+
* @param {String} id The render id associated with the asset in UUID format
191+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AssetRenderResponse}
192+
*/
193+
this.getAssetByRenderId = function(id) {
194+
return this.getAssetByRenderIdWithHttpInfo(id)
195+
.then(function(response_and_data) {
196+
return response_and_data.data;
197+
});
198+
}
199+
};
200+
201+
return exports;
202+
}));

0 commit comments

Comments
 (0)