node-calendly
Version:
Node module to access calendly api.
33 lines • 1.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Information about a scheduled meeting. Provides one more method:
* - fromJson: Creates an event object from a json object.
* @export default
* @interface CalendlyEvent
* @implements {EventType}
* @see https://developer.calendly.com/api-docs/504508461e486-event
*/
class CalendlyEvent {
constructor(event) {
this.uri = event.uri;
this.name = event.name;
this.status = event.status;
this.start_time = new Date(event.start_time);
this.end_time = new Date(event.end_time);
this.event_type = event.event_type;
this.location = event.location;
this.invitees_counter = event.invitees_counter;
this.created_at = new Date(event.created_at);
this.updated_at = new Date(event.updated_at);
this.event_memberships = event.event_memberships;
this.event_guests = event.event_guests;
this.cancellation = event.cancellation;
this.uuid = this.uri.split('/').pop();
}
static fromJSON(event) {
return new CalendlyEvent(event);
}
}
exports.default = CalendlyEvent;
//# sourceMappingURL=Event.js.map