Skip to content

Commit 066356c

Browse files
committed
Add default provider and fluent setters
1 parent 87e5b2a commit 066356c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/model/ShotstackDestination.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*/
1515

16-
(function(root, factory) {
16+
(function(root, factory) {
1717
if (typeof define === 'function' && define.amd) {
1818
// AMD. Register as an anonymous module.
1919
define(['ApiClient'], factory);
@@ -43,10 +43,12 @@
4343
* Send rendered assets to the Shotstack hosting and CDN service. This destination is enabled by default.
4444
* @alias module:model/ShotstackDestination
4545
* @class
46+
* @param provider {String} The destination to send rendered assets to - set to `shotstack` for Shotstack hosting and CDN.
4647
*/
47-
var exports = function() {
48+
var exports = function(provider) {
4849
var _this = this;
4950

51+
_this['provider'] = provider || 'shotstack';
5052
};
5153

5254
/**
@@ -97,6 +99,7 @@
9799
*/
98100
exports.prototype.setProvider = function(provider) {
99101
this['provider'] = provider;
102+
return this;
100103
}
101104

102105

@@ -114,6 +117,7 @@
114117
*/
115118
exports.prototype.setExclude = function(exclude) {
116119
this['exclude'] = exclude;
120+
return this;
117121
}
118122

119123

0 commit comments

Comments
 (0)