The changes are a little crowded by a property renaming (options to config in socrata.js) so I'll give a high-level explanation of the changes here.
Providers (ie. the socrata.js collection) implement a public getFields method which returns a promise that is passed a fields collection when it's resolved.
Provider collections are passed a global fieldsCache hash when they're initialized so that getFields can cache its results and share them between collections that use the same dataset
P.S. @chriswhong I know this would require some changes to the cartodb provider you've been working on. I'm happy to submit those as a pull request but I'd welcome your feedback before it's finalized.
Fixes #147
The changes are a little crowded by a property renaming (
options
toconfig
in socrata.js) so I'll give a high-level explanation of the changes here.getFields
method which returns a promise that is passed a fields collection when it's resolved.fieldsCache
hash when they're initialized so thatgetFields
can cache its results and share them between collections that use the samedataset
As a result here are the basic requirements for providers. Thoughts?
P.S. @chriswhong I know this would require some changes to the cartodb provider you've been working on. I'm happy to submit those as a pull request but I'd welcome your feedback before it's finalized.