Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fetch(`https://slides.googleapis.com/v1/presentations/${idOfPresentationWithMoreThanFiftySlides}`, {
  2.     method: "GET",
  3.     headers: {
  4.         Authorization: "Bearer ${token}"
  5.     },
  6. })
  7. .then(res => res.json())
  8. .then(res => {
  9.     res.slides.forEach(slide => {
  10.         fetch(`https://slides.googleapis.com/v1/presentations/${res.presentationId}/pages/${slide.objectId}/thumbnail?thumbnailProperties.mimeType=PNG&thumbnailProperties.thumbnailSize=LARGE`, {
  11.             method: "GET",
  12.             headers: {
  13.                 Authorization: "Bearer ${token}"
  14.             }
  15.         })
  16.         .then(res => res.json())
  17.         .then(res => console.log(res))
  18.     })
  19. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement