Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Single JavaScript API Client for sheet2api.com (github.com/odwyersoftware)
54 points by _wka6 on July 22, 2020 | hide | past | favorite | 10 comments


This isn't what it sounds like. Based on the post title and the repo name I thought this was a library that could read and write data from Google Sheets and MS Excel Online. It's not that. It's a library to use sheet2api.com, which is a proxy to read and write JSON data from Google Sheets and MS Excel Online. All of your data goes through a 3rd party service. That is significantly different.

The title really should be "Show HN: Single JavaScript API Client for sheet2api.com"

From a JS front end dev perspective it's not actually very good as a library. There's literally no error handling at all (it just passes you the error from XMLHttpRequest; it could do so much more), there's no auth, and it's based on the old XMLHttpRequest API rather than the more modern, and much better in my opinion, fetch() API.


Thanks for the constructive feedback. I'll improve those mentioned areas.


I agree about the last part. It seems a like a library from several years ago. I couldn't stop the willing to send some PRs to improve it and make it modern.


> it's based on the old XMLHttpRequest API rather than the more modern, and much better in my opinion, fetch() API.

I fail to see what is wrong about it.


XMLHttpRequest is callback based and has an interesting API. fetch was written to be a sensible replacement. It does nice things like supporting promises by default and handling request cancellation.


XHR and fetch were in a "old thing is deprecated, new thing is not ready" sort of state for the longest time.

XHR always supported aborting requests, along with progress callbacks. Also, IE11 doesn't support fetch, so you'd need to bring in a polyfill for it and for Promise there. (And FormData, and Blob and etc, if we're talking full spec compliance)

Considering this history, I wouldn't dismiss an XHR-based implementation so fast.


Ok, we've changed the title to that from "Show HN: Single JavaScript API Client for Google Sheets and MS Excel APIs"


Nice, this looks like something i might use to mock an api server in the early stages of a project.


You're better using Postman for this case: https://learning.postman.com/docs/designing-and-developing-y...


I think authorization is the most important part to avoid randos flood your "database". Otherwise, why do not just use the Google Sheets API.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: