async function runSample() {
  const auth = await authenticate({
    keyfilePath: path.join(__dirname, '../oauth2.keys.json'),
    scopes: ['https://www.googleapis.com/auth/youtube'],
  });
  google.options({auth});

  const res = await youtube.search.list({
    part: 'id,snippet',
    q: 'Node.js on Google Cloud',
  });
  console.log(res.data);
}
// a very simple example of searching for youtube videos
a very simple example of searching for youtube videos
a very simple example of searching for youtube videos
async function runSample() {
  const auth = await authenticate({
    keyfilePath: path.join(__dirname, '../oauth2.keys.json'),
    scopes: ['https://www.googleapis.com/auth/youtube'],
  });
  google.options({auth});
  const res = await youtube.search.list({
    part: 'id,snippet',
    q: 'Node.js on Google Cloud',
  });
  console.log(res.data);
}
async function runSample ( ) { const auth = await authenticate ( { keyfilePath : path . join ( __dirname , '../oauth2.keys.json' ) , scopes : [ 'https://www.googleapis.com/auth/youtube' ] , } ) ; google . options ( { auth } ) ; const res = await youtube . search . list ( { part : 'id,snippet' , q : 'Node.js on Google Cloud' , } ) ; console . log ( res . data ) ; }
a very simple example of searching for youtube videos
a very simple example of searching for youtube videos