0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-01 01:12:39 +00:00
VueTube/NUXT/plugins/youtube.js

18 lines
406 B
JavaScript

import { Http } from '@capacitor-community/http';
const module = {
async autoComplete(text, callback) {
const options = {
url: 'https://suggestqueries-clients6.youtube.com/complete/search',
params: { client: 'youtube', q: text },
};
const response = await Http.request(options);
callback(response)
}
}
export default ({ app }, inject) => {
inject('youtube', module)
}