Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Create PendingResultBase type requests for Roads API. #790

Merged
merged 5 commits into from
Jan 11, 2022

Conversation

arriolac
Copy link
Contributor

Created SpeedLimitsApiResponse, SnapToRoadsApiRequest and NearestRoadsApiRequest
of type PendingResultBase.

BREAKING CHANGE: request signature in RoadsApi has changed to account for these new classes.

Previous usage of RoadsApi:

PendingResult<SnappedPoint[]> pendingResult = RoadsApi.snapToRoads(context, path);
SnappedPoints[] points = pendingResult.await();

New usage:

SnapToRoadsApiRequest request = RoadsApi.snapToRoads(context, path);

// Optional request modification
request.header("HEADER_KEY", "HEADER_VAL");
SnappedPoints[] points = request.await();

Fixes #788 🦕

BREAKING CHANGE: methods in the RoadsApi class now return
PendingResultBase type classes to allow modification (e.g. adding
headers) to the request.
@arriolac arriolac merged commit 7c6af3d into main Jan 11, 2022
@arriolac arriolac deleted the chris/feat/788 branch January 11, 2022 19:23
googlemaps-bot pushed a commit that referenced this pull request Jan 11, 2022
# [2.0.0](v1.0.1...v2.0.0) (2022-01-11)

* feat!: Create PendingResultBase type requests for Roads API. (#790) ([7c6af3d](7c6af3d)), closes [#790](#790)

### BREAKING CHANGES

* methods in the RoadsApi class now return
PendingResultBase type classes to allow modification (e.g. adding
headers) to the request.

* Add NearestRoadsApiRequest.

* s/path/points

* Add points.

* Formatting.:
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support experience ID in RoadsAPI
2 participants