zooniverse / json-api-client

Apache License 2.0
10 stars 5 forks source link

Client should return actual API response when using include query param #34

Open srallen opened 7 years ago

srallen commented 7 years ago

Currently the client will take the resources in the include query param, request them, and will cache them, but the return value of the promise is the original resource type that is requested and not all of the requested resources. It isn't not obvious that the included resources are cached and seems counterintuitive to have to make another "get" request to get those out of the cache.

IMO, the client should just return the actual API response which is an object that has all of the resources easily accessible as well as the metadata.