Skip to content

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

Merged
arriolac merged 5 commits into
mainfrom
chris/feat/788
Jan 11, 2022
Merged

feat!: Create PendingResultBase type requests for Roads API.#790
arriolac merged 5 commits into
mainfrom
chris/feat/788

Conversation

@arriolac

Copy link
Copy Markdown
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
Copy Markdown
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

2 participants