Adding flexibility to Matrix API builder to set custom max coordinate list size limit#1133
Merged
langsmith merged 3 commits intoMar 30, 2020
Conversation
Author
|
The only reason why this isn't ready for review is because I'd like to test this work with a token that's been given permission to make calls with a coordinate list size greater than 25. |
…-to-matrix-builder
Author
✔️ . Used a token with increased permission. Calls are working as expected. This is good for review. |
Member
|
@langsmith Approving to unblock the release. @LukasPaczos Great if you can give it a second pass when you have a chance. |
zugaldia
approved these changes
Mar 30, 2020
LukasPaczos
reviewed
Mar 31, 2020
Contributor
LukasPaczos
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding tests!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1124 by adding support for Matrix API calls with a coordinate list size that's greater than 25.
After approval from the Mapbox team, a Mapbox account can make Matrix API calls with a coordinate list that's larger than the default of 25. This pr unblocks users from using the Java SDK's
MapboxMatrix.builder()to make those 26+ calls.This pr introduces a
.coordinateListSizeLimit()method, which takes anIntegerparameter. The parameter represents the new max number of coordinates per call. If the number passed through is higher than what the Mapbox account is allowed (e.g. passing.coordinateListSizeLimit(50)when 25 is still the max limit for that Mapbox account/token), the backend API response will respond with an error message. However, at least the Matrix API call will now be allowed/made by the Java SDK rather than an exception being thrown before the call is even made.cc @juliawinder @chloekraw @brandihaskins @zugaldia