How to download Google Apps Script? -
i'm writing little ruby script sync google apps script files. i'm following instructions google developers , examples on github (google/google-api-ruby-client-samples).
after getting list of project files i'm trying content of each file. proposed in guide fetch the export-links url:
result = google_client.execute(:uri => file_data['exportlinks']['application/vnd.google-apps.script+json'])
the problem http status 302 , html content telling me document has moved. opening url in browser downloads file correctly. guess due authentication functionality. there way make client library handle properly?
fetching normal document in format works fine way...
the complete code can found on github: https://github.com/devex/gaspm
you can get https://script.google.com/feeds/download/export?format=json&id=[fileid]
same access token use authorize other drive api requests.
Comments
Post a Comment