"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HistoryCommand = void 0;
const shared_1 = require("../shared");
class HistoryCommand extends shared_1.AbstractCommand {
    list(options = {}) {
        const { search } = options;
        const path = '/api/v1/users/me/history/videos';
        return this.getRequestBody(Object.assign(Object.assign({}, options), { path, query: {
                search
            }, implicitToken: true, defaultExpectedStatus: 200 }));
    }
    removeElement(options) {
        const { videoId } = options;
        const path = '/api/v1/users/me/history/videos/' + videoId;
        return this.deleteRequest(Object.assign(Object.assign({}, options), { path, implicitToken: true, defaultExpectedStatus: 204 }));
    }
    removeAll(options = {}) {
        const { beforeDate } = options;
        const path = '/api/v1/users/me/history/videos/remove';
        return this.postBodyRequest(Object.assign(Object.assign({}, options), { path, fields: { beforeDate }, implicitToken: true, defaultExpectedStatus: 204 }));
    }
}
exports.HistoryCommand = HistoryCommand;
//# sourceMappingURL=history-command.js.map