Skip to content

Batch geocoding support#267

Merged
zugaldia merged 7 commits intomasterfrom
batch-geocoder
Jan 11, 2017
Merged

Batch geocoding support#267
zugaldia merged 7 commits intomasterfrom
batch-geocoder

Conversation

@zugaldia
Copy link
Member

We add a new API specific for batch requests that can be used like:

MapboxGeocoding client = new MapboxGeocoding.Builder()
  .setAccessToken(ACCESS_TOKEN)
  .setMode(GeocodingCriteria.MODE_PLACES_PERMANENT)
  .setLocation("20001;20009;22209")
  .build();
Response<List<GeocodingResponse>> response = client.executeBatchCall();

Fixes #262.

Review: @cammace

@mention-bot
Copy link

@zugaldia, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cammace, @ivovandongen and @tobrun to be potential reviewers.

}

if (builder.getQuery().contains(";")) {
throw new IllegalArgumentException("Use getBatchCall() for batch calls.");
Copy link

Choose a reason for hiding this comment

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

niceee

/**
* Used internally.
*
* @return batch call
Copy link

Choose a reason for hiding this comment

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

@since 2.0.0 :)

* Execute the batch call
*
* @return The Geocoding v5 response
* @throws IOException Signals that an I/O exception of some sort has occurred.
Copy link

Choose a reason for hiding this comment

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

@since 2.0.0

* @param bbox Optionally pass in a bounding box to limit results in.
* @param limit Optionally pass in a limit the amount of returning results.
* @return A retrofit Call object
* @since 1.0.0
Copy link

Choose a reason for hiding this comment

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

@since 2.0.0

/**
* Execute the batch call
*
* @param callback A Retrofit callback.
Copy link

Choose a reason for hiding this comment

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

@since 2.0.0


/**
* Cancel the batch call
*
Copy link

Choose a reason for hiding this comment

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

@since 2.0.0

/**
* clone the batch call
*
* @return cloned call
Copy link

Choose a reason for hiding this comment

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

@since 2.0.0

import static org.junit.Assert.assertEquals;

/**
* Created by antonio on 1/10/17.
Copy link

Choose a reason for hiding this comment

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

cough cough :)

@zugaldia
Copy link
Member Author

@cammace Changes addressed, care to 👀 again?

@zugaldia zugaldia merged commit 5a3f31c into master Jan 11, 2017
@zugaldia zugaldia deleted the batch-geocoder branch January 11, 2017 19:01
@zugaldia zugaldia mentioned this pull request Feb 10, 2017
9 tasks
@zugaldia zugaldia mentioned this pull request Feb 22, 2017
9 tasks
@zugaldia zugaldia mentioned this pull request Mar 9, 2017
9 tasks
@zugaldia zugaldia mentioned this pull request Mar 17, 2017
9 tasks
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.

3 participants