google-api-python-client icon indicating copy to clipboard operation
google-api-python-client copied to clipboard

Delete appscript project via the python api client

Open w1redch4d opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

It would be better if we had an option to delete appscript projects using the python api client with the script service, rather than having to use a separate service like gdrive to remove the file

Describe the solution you'd like

for now what we do for creating a project is the following :

service = build('script', 'v1', credentials=creds)
request = {'title': 'My Project'}
service.projects().create(body=request).execute()

I would like a similar functionality to delete the script project which is created using the above code an example of what i want would look like:

service = build('script', 'v1', credentials=creds)
request = {'title': 'My Project'}
service.projects().delete(body=request).execute()

Describe alternatives you've considered

script = build('script', 'v1', credentials=creds)
drive = build('drive', 'v3', credentials=creds)

request = {'title': 'My Project'}
response = service.projects().create(body=request).execute()

drive.files().delete(fileId=response['scriptId']).execute()

w1redch4d avatar Dec 29 '22 18:12 w1redch4d