mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-22 19:25:16 +00:00
14 lines
312 B
JavaScript
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)
|
|
}
|