Closed rogerhutchings closed 5 years ago
From @srallen on February 9, 2018 18:21
I'd like to avoid the high level of abstraction the current json-api-client does. The simple abstraction I did in edu-api-front-end is more the direction I'd like. I also did the same in my example react, router5, mobx app: https://github.com/srallen/react-mobx-starter/blob/master/app/lib/apiClient.js
We could have a mobx store handle auth and some simple functions to add anything we would like on top of superagent. Another similar approach that we could borrow is in this mobx real world example app which also has defined the class methods for requests per model: https://github.com/gothinkster/react-mobx-realworld-example-app/blob/master/src/agent.js
panoptes.js has request helpers per model (still being built out) as well as a simple set for basic HTTP REST.
From @rogerhutchings on December 5, 2017 15:46
Copied from original issue: zooniverse/panoptesjs#1