SitePen / dstore

A data infrastructure framework, providing the tools for modelling and interacting with data collections and objects.
http://dstorejs.io/
Other
281 stars 83 forks source link

Documentation for alternative root in data #104

Open dylans opened 9 years ago

dylans commented 9 years ago

One thing that seems to throw beginners is how to specify an alternative root to use for their data structure, as all of our examples show just pointing at data.

The obvious example is to show that instead of pointing at a data object, you could point to data.foo.bar.

Some other projects make this easier to specify by having a root property that you can define, though I'm not convinced we really need that, but I mention it as some people coming from other projects look for the dstore equivalent.

kfranqueiro commented 9 years ago

@kriszyp, I assume this should be reopened? I think you referenced the wrong issue in a commit.

kriszyp commented 9 years ago

Yes.

kfranqueiro commented 9 years ago

Given that people often have to work with services they don't have direct control over, being able to tell Request a property to look for data in, as well as an alternative property other than total (which is currently hard-coded) to look for a total number of results in, would be pretty useful. As it is, you'd currently have to either hook up a request provider or do some onerous dancing around with extending _request to accomplish it.

I could add this as a separate issue / feature request, but it's directly related to the documentation being asked for - and basically my TL;DR is it'd be easier to document if we made it easier to actually do, first.