Hacker News new | ask | show | jobs
by chasontherobot 3001 days ago
Recently had to use Apps script to count the number of files in a number of Google drives folder, it was pretty annoying.

The Drive API doesn't actually expose that information at all so I had to loop through the files with a counter to get the information I needed, but that was so inefficient that I got timeout errors for anything but the smallest of folders.

Unfortunately I had to resort to their Python API which was totally awful in its own way, but at least I didn't have to worry about timeout errors and could get the job done.

Google apps script is probably good for doing stuff in spreadsheets or documents, but its use as an API across Google's platform really needs some work.

2 comments

Having used the Spreadsheets API, I can say it's definitely bad, mainly because of its slowness and the small amount of data any query can return. We needed 45 seconds to modify two fields in any given document.
And this is called progress. Sharing files on a central computer system (mainframe), and efficient scripting (e.g. VMS,Unix,etc) was solved in the 70s.
pretty much everything connected with the web is a leap backwards in many ways...not only the programming language and tooling ;)