Skip to content

Conversation

@langsmith
Copy link

@langsmith langsmith commented Mar 28, 2020

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 an Integer parameter. 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

@langsmith langsmith self-assigned this Mar 28, 2020
@langsmith
Copy link
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.

@langsmith langsmith added the WIP label Mar 29, 2020
@langsmith langsmith marked this pull request as ready for review March 30, 2020 16:33
@langsmith langsmith requested a review from zugaldia March 30, 2020 16:33
@langsmith
Copy link
Author

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.

✔️ . Used a token with increased permission. Calls are working as expected. This is good for review.

@zugaldia zugaldia requested a review from LukasPaczos March 30, 2020 19:46
@zugaldia
Copy link
Member

@langsmith Approving to unblock the release.

@LukasPaczos Great if you can give it a second pass when you have a chance.

@langsmith langsmith merged commit 6c9bab0 into master Mar 30, 2020
@langsmith langsmith deleted the ls-adding-coordinate-list-size-flexibility-to-matrix-builder branch March 31, 2020 00:00
@langsmith langsmith mentioned this pull request Mar 31, 2020
13 tasks
Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for adding tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Matrix API calls with more than 25 coordinates

3 participants