0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-22 19:25:16 +00:00
VueTube/NUXT/plugins/youtubei.js
2022-02-24 14:45:36 -05:00

14 lines
312 B
JavaScript

const module = {
search(phrase, type, callback) {
const ytclient = require("youtubei").Client;
const youtube = new ytclient();
youtube.search(phrase, { type: "video" }).then((results) => {
callback(results);
});
}
}
export default ({ app }, inject) => {
inject('youtube', module)
}