"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VideoTokenCommand = void 0;
const tslib_1 = require("tslib");
const requests_1 = require("../requests");
const shared_1 = require("../shared");
class VideoTokenCommand extends shared_1.AbstractCommand {
    create(options) {
        const { videoId } = options;
        const path = '/api/v1/videos/' + videoId + '/token';
        return (0, requests_1.unwrapBody)(this.postBodyRequest(Object.assign(Object.assign({}, options), { path, implicitToken: true, defaultExpectedStatus: 200 })));
    }
    getVideoFileToken(options) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const { files } = yield this.create(options);
            return files.token;
        });
    }
}
exports.VideoTokenCommand = VideoTokenCommand;
//# sourceMappingURL=video-token-command.js.map