UNPKG

@tnwx/commons

Version:

TTNWX 微信系开发脚手架之公共模块

42 lines 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const OutMsg_1 = require("./OutMsg"); class OutVideoMsg extends OutMsg_1.OutMsg { constructor(inMsg) { super(inMsg); this.msgType = 'video'; } toXml() { let str = super.toXml(); if (!this.mediaId) { throw new Error('mediaId is null'); } str += '<Video>\n'; str += '<MediaId><![CDATA[' + this.getMediaId + ']]></MediaId>\n'; str += '<Title><![CDATA[' + this.getTitle + ']]></Title>\n'; str += '<Description><![CDATA[' + this.getDescription + ']]></Description>\n'; str += '</Video>\n'; str += '</xml>\n'; return str; } get getMediaId() { return this.mediaId; } set setMediaId(mediaId) { this.mediaId = mediaId; } get getTitle() { return this.title; } set setTitle(title) { this.title = title; } get getDescription() { return this.description; } set setDescription(description) { this.description = description; } } exports.OutVideoMsg = OutVideoMsg; //# sourceMappingURL=OutVideoMsg.js.map