New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shell functionality (clasp run
)
#11
Comments
Yup. This is definitely a wish I have! Something like:
|
If I find some time, I would like to get my hands dirty and do some POC and maybe it sticks ;) |
I haven't played around much with the execution part of the API, but this would be my general plan. LMK if you need help with the POC. V1Execute functions that don't require credentials. function getPi() {
return 3.1415;
} clasp run getPi
3.1415 V2Execute functions that require Google Services (OAuth: like Gmail, Sheets...). I think we'd have to request more specific scopes for Store scopes in (TODO: Document
function sendMail() {
MailApp.sendEmail("email@example.com", "Test", "hi");
} V3Have the user re-login if they haven't auth'd the required credentials. (Requires that clasp store which credentials have been authorized per project) Ref: https://developers.google.com/apps-script/api/reference/rest/v1/scripts/run |
Clear. Additionally I thought of logging. |
I think V1 is possible with Logging is a fantastic idea. Let's add that as a different issue. |
In order to run a script, you need to use your own API key with Next steps:
|
Specific next steps: Enable a user to use their own API keyThe first step would be to create a personal (rather than global) client ID/secret and store that in the
Develop
|
Since clasp is running authorised, it would be nice if it could leverage the execution api to add a shell functionality.
Looking at firebase's Cloudfunctions where the shell is a powerfull tool.
The text was updated successfully, but these errors were encountered: