twilio
Version:
A Twilio helper library
58 lines (48 loc) • 1.33 kB
JavaScript
;
/* jshint ignore:start */
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
/* jshint ignore:end */
var _ = require('lodash'); /* jshint ignore:line */
var RecordingList = require('./v1/recording').RecordingList;
var RoomList = require('./v1/room').RoomList;
var Version = require('../../base/Version'); /* jshint ignore:line */
/* jshint ignore:start */
/**
* Initialize the V1 version of Video
*
* @constructor Twilio.Video.V1
*
* @property {Twilio.Video.V1.RecordingList} recordings - recordings resource
* @property {Twilio.Video.V1.RoomList} rooms - rooms resource
*
* @param {Twilio.Video} domain - The twilio domain
*/
/* jshint ignore:end */
function V1(domain) {
Version.prototype.constructor.call(this, domain, 'v1');
// Resources
this._recordings = undefined;
this._rooms = undefined;
}
_.extend(V1.prototype, Version.prototype);
V1.prototype.constructor = V1;
Object.defineProperty(V1.prototype,
'recordings', {
get: function() {
this._recordings = this._recordings || new RecordingList(this);
return this._recordings;
}
});
Object.defineProperty(V1.prototype,
'rooms', {
get: function() {
this._rooms = this._rooms || new RoomList(this);
return this._rooms;
}
});
module.exports = V1;