@sugarcube/plugin-youtube
Version:
A SugarCube plugin to fetch videos from Youtube.
88 lines (80 loc) • 2.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseYoutubeVideo", {
enumerable: true,
get: function () {
return _utils.parseYoutubeVideo;
}
});
Object.defineProperty(exports, "parseYoutubeChannel", {
enumerable: true,
get: function () {
return _utils.parseYoutubeChannel;
}
});
Object.defineProperty(exports, "normalizeYoutubeVideoUrl", {
enumerable: true,
get: function () {
return _utils.normalizeYoutubeVideoUrl;
}
});
Object.defineProperty(exports, "normalizeYoutubeChannelUrl", {
enumerable: true,
get: function () {
return _utils.normalizeYoutubeChannelUrl;
}
});
Object.defineProperty(exports, "isYoutubeVideo", {
enumerable: true,
get: function () {
return _utils.isYoutubeVideo;
}
});
Object.defineProperty(exports, "isYoutubeChannel", {
enumerable: true,
get: function () {
return _utils.isYoutubeChannel;
}
});
exports.default = exports.features = exports.plugins = void 0;
var _fp = require("lodash/fp");
var _channel = _interopRequireDefault(require("./plugins/channel"));
var _video = _interopRequireDefault(require("./plugins/video"));
var _filterFailing = _interopRequireDefault(require("./plugins/filter-failing"));
var _utils = require("./utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const plugins = {
youtube_channel: _channel.default,
youtube_video: _video.default,
youtube_filter_failing: _filterFailing.default
};
exports.plugins = plugins;
(0, _fp.forEach)(p => {
// eslint-disable-next-line no-param-reassign
p.argv = (0, _fp.merge)({
"youtube.api_key": {
type: "string",
nargs: 1,
desc: "The youtube API key."
}
}, p.argv);
}, plugins);
const features = {
ncube: {
desc: "Enable to Ncube compatibility."
}
};
exports.features = features;
var _default = {
plugins,
features,
parseYoutubeVideo: _utils.parseYoutubeVideo,
parseYoutubeChannel: _utils.parseYoutubeChannel,
normalizeYoutubeVideoUrl: _utils.normalizeYoutubeVideoUrl,
normalizeYoutubeChannelUrl: _utils.normalizeYoutubeChannelUrl,
isYoutubeVideo: _utils.isYoutubeVideo,
isYoutubeChannel: _utils.isYoutubeChannel
};
exports.default = _default;