async function listSlides(auth) {
  const slidesApi = google.slides({version: 'v1', auth});
  const res = await slidesApi.presentations.get({
    presentationId: '1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc',
  });
  const slides = res.data.slides;
  if (!slides || slides.length === 0) {
    console.log('No slides found.');
    return;
  }
  console.log('The presentation contains %s slides:', slides.length);
  res.data.slides.forEach((slide, i) => {
    console.log(
        `- Slide #${i + 1} contains ${slide.pageElements.length} elements.`,
    );
  });
}
Prints the number of slides and elements in a sample presentation:
https://docs.google.com/presentation/d/1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc/edit
@param {google.auth.OAuth2} auth The authenticated Google OAuth client.