3 ms·
Show HN: Single JavaScript API Client for sheet2api.com
- onion2k 6y agoThis 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.
- richardARPANET 6y agoThanks for the constructive feedback. I'll improve those mentioned areas.
- rat9988 6y ago> 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.
- onion2k 6y agoXMLHttpRequest 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.
- lhorie 6y agoXHR 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.
- dang 6y agoOk, we've changed the title to that from "Show HN: Single JavaScript API Client for Google Sheets and MS Excel APIs"
- davide_v 6y agoI 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.
- Moghammed 6y agoNice, this looks like something i might use to mock an api server in the early stages of a project.
- qerim 6y agoYou're better using Postman for this case: https://learning.postman.com/docs/designing-and-developing-your-api/mocking-data/setting-up-mock/ https://learning.postman.com/docs/designing-and-developing-y...
- mmmqaq 6y agoI think authorization is the most important part to avoid randos flood your "database". Otherwise, why do not just use the Google Sheets API.