govitia / navitia

A client library in Go for the Navitia API (navitia.io) (v2 WIP)
The Unlicense
6 stars 2 forks source link

Fixed PlacesNearby in a scope / Added ExploreResource #1

Closed adelcasse closed 7 years ago

adelcasse commented 7 years ago

Fixed PlacesNearby in a scope (missing "/coord/" URL node for coordinates) Added ExploreResource to search for elements (lines, networks, ...) linked to a resource inside a scope (/coverage/{regionId}/{resourceType}/{resourceId}/{elementsName (lines/etc...)}

aabizri commented 7 years ago

Thanks for the PR @adelcasse, I merged your code, modifying it without changing the function signature of ExploreResource as ID.Type was originally not intended for this function.

I added a few tests on the changes, but I should note that IDs without the resource type prefix in them will not be recognised (disruptions and other resources fit in this category). These will probably need a new method with an explicit indication of the resource's type.

Again, thanks for the PR and hopefully the package is useful !

adelcasse commented 7 years ago

Thanks @aabizri, it definitely will be usefull : I will be using it in "the real world" in https://www.ridygo.fr ;)

On your change, there is an issue with "selector" : sending a new pull request to fix this. Anyway the right way to do as you said is chaining requests. I will look at this.