apps-script-samples
apps-script-samples copied to clipboard
Add READMEs for the quickstarts that point to the setup steps
Expected Behavior
Seems like google script no longer has a Calendar class.
Sample URL:https://github.com/gsuitedevs/apps-script-samples/blob/master/calendar/quickstart/quickstart.gs Description:
Actual Behavior
Steps to Reproduce the Problem
You have to enable it first, via the steps here:
https://developers.google.com/calendar/quickstart/apps-script#step_2_turn_on_the
@erickoledadevrel I have same problem, and find the answer here. thanks.
I use TypeScript using @types/google-apps-script with clasp. But there is no definition Calendar in it.
Instead of CalendarApp is exists.
Do you have answer what I am doing?
My assumption:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29388 has empty calendar definition file. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google-apps-script/apis/calendar/v3.d.ts
Copy the definition from ↓ and works fine...? https://github.com/googleapis/google-api-nodejs-client/blob/v37.2.0/src/apis/calendar/v3.ts
The original issue being discussed here is that until you enable the advanced service it won't be available at runtime. The instruction in the quickstart web pages mention this step, but we should have a README that does the same.
The missing TypeScript definitions is a different issue doesn't affect runtime. The TypeScript definitions are maintained by the community and not guaranteed to be accurate or up-to-date. The Apps Script advanced service is very similar to the Node.js interface, but not identical.
@erickoledadevrel Thank you for your reply. Sorry about my question out of this issue.
I regret this page says gas can develop with typescript, but can not use advanced service easily. I want to use advanced service with typescript, so I try to generate type definition of advanced service, I'll send pull request to DefinitelyTyped like Google slide https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29388 .
FYI, since April 2019, there have been TypeScript definitions for Advanced Services:
For example, see this for Calendar:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google-apps-script/apis/calendar_v3.d.ts