-
Notifications
You must be signed in to change notification settings - Fork 114
Datasets API support #80
Conversation
Copied over from defunct branch.
This is not a resource-oriented interface
I like this approach, one class with a couple methods, geojson all around, simple. A few thoughts:
|
@perrygeo right, I copied Table looks good to me. Batching is there to support both paged responses from feature reads and paged writes from streams of features. |
@perrygeo FYI I did a bit of exploration on |
I'm still fuzzy on why the |
I did some additional testing this morning and found a few things we might need to address.
|
Re: tokens without proper scope. Proposed upstream to change make api-core return a 403 (forbidden) status code with a better error message. |
Copied over from defunct branch.
This is not a resource-oriented interface
Conflicts: mapbox/services/datasets.py tests/test_datasets.py
With test coverage. Not yet fully implemented and tested: paging collections of dataset features.
@perrygeo ready for review and merge. there are two issues i'd like to tackle after this is merged:
|
>>> len(updated_collection['features']) | ||
1 | ||
>>> updated_first = updated_collection['features'][0] | ||
>>> updated_first['id'] # should return '2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is an eventual consistency issue, isn't it also possible that list_features
could return feature 2
under certain circumstances? Maybe we should just note it but not test it until we find a way to poll the service.
Other than the list_features consistency, it looks great to me 👍 |
@perrygeo yeah, further down in the doctest we are able to access a feature with id 2. Because I'm not sure that users should count on the list features endpoint to be instantly consistent with the update endoint, I'm going to remove those lines of the doctest. |
This PR provides a relatively low-level interface much like mapbox-sdk-js's.
resolves #15