빠른 시작에서는 Google Workspace API를 호출하는 앱을 설정하고 실행하는 방법을 설명합니다.
Google Workspace 빠른 시작에서는 API 클라이언트 라이브러리를 사용하여 인증 및 승인 흐름의 일부 세부정보를 처리합니다. 자체 앱에는 클라이언트 라이브러리를 사용하는 것이 좋습니다. 이 빠른 시작에서는 테스트 환경에 적합한 간소화된 인증 접근 방식을 사용합니다. 프로덕션 환경의 경우 앱에 적합한 액세스 사용자 인증 정보를 선택하기 전에 인증 및 승인에 관해 알아보는 것이 좋습니다.
/** * Creates a Slides API service object and logs the number of slides and * elements in a sample presentation: * https://docs.google.com/presentation/d/1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc/edit */functionlogSlidesAndElements(){constpresentationId='1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc';try{// Gets the specified presentation using presentationIdconstpresentation=Slides.Presentations.get(presentationId);constslides=presentation.slides;// Print the number of slides and elements in presentationconsole.log('Thepresentationcontains%sslides:',slides.length);for(leti=0;i < slides.length;i++){console.log('-Slide#%scontains%selements.',i+1,slides[i].pageElements.length);}}catch(err){// TODO (developer) - Handle Presentation.get() exception from Slides APIconsole.log('FailedtofoundPresentationwitherror%s',err.message);}}
[null,null,["최종 업데이트: 2024-12-21(UTC)"],[[["This quickstart demonstrates how to use Google Apps Script to create a script that interacts with the Google Slides API."],["You will learn how to configure the script, enable the Google Slides API, and run the script to access slide data."],["The provided code sample retrieves and logs the number of slides and elements within a specific Google Slides presentation."],["To run this quickstart, you'll need a Google Account and access to Google Drive."],["For production environments, review authentication and authorization best practices before choosing access credentials for your application."]]],[]]