빠른 시작에서는 Google Workspace API를 호출하는 앱을 설정하고 실행하는 방법을 설명합니다.
Google Workspace 빠른 시작에서는 API 클라이언트 라이브러리를 사용하여 인증 및 승인 흐름의 일부 세부정보를 처리합니다. 자체 앱에는 클라이언트 라이브러리를 사용하는 것이 좋습니다. 이 빠른 시작에서는 테스트 환경에 적합한 간소화된 인증 접근 방식을 사용합니다. 프로덕션 환경의 경우 앱에 적합한 액세스 사용자 인증 정보를 선택하기 전에 인증 및 승인에 관해 알아보는 것이 좋습니다.
/** * Lists the user's tasks. * @see https://developers.google.com/tasks/reference/rest/v1/tasklists/list */functionlistTaskLists(){constoptionalArgs={maxResults:10};try{// Returns all the authenticated user's task lists.constresponse=Tasks.Tasklists.list(optionalArgs);consttaskLists=response.items;// Print task list of user if available.if(!taskLists||taskLists.length===0){console.log('Notasklistsfound.');return;}for(consttaskListoftaskLists){console.log('%s(%s)',taskList.title,taskList.id);}}catch(err){// TODO (developer) - Handle exception from Task APIconsole.log('Failedwitherror%s',err.message);}}
[null,null,["최종 업데이트: 2024-12-21(UTC)"],[[["This quickstart demonstrates how to create a Google Apps Script that interacts with the Google Tasks API to list tasks."],["Before running the script, you need a Google account with Google Tasks and Drive enabled, and you will need to enable the Google Tasks API within the script."],["The script utilizes Google API client libraries for authentication and is designed for a testing environment; production environments require more robust authentication."],["After configuring and running the script, it will prompt for authorization to access your Google Tasks data and then display your task lists in the execution log."],["For more advanced usage and troubleshooting, refer to the provided links for Google Apps Script, authentication, and the Tasks API."]]],["This content details how to create and run a Google Apps Script that interacts with the Google Tasks API. Key actions include creating a new script, replacing the default code with a provided sample to list task lists, saving and renaming the script, and enabling the Tasks API within the script's services. Running the script requires authorizing access, after which it will display the user's task lists in the execution log, or error if failed. It use a simplified authorization and suggest to do more in depth authorization for production.\n"]]