Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Java SDK for accessing Precisely APIs which transform your business with new insights. Enrich and enhance your data, applications, business processes, and workflows with hundreds of Location and Identity datasets and APIs.
/*
* Precisely APIs
* Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs.
*
* The version of the OpenAPI document: 18.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.precisely.apis;
import com.precisely.ApiCallback;
import com.precisely.ApiClient;
import com.precisely.ApiException;
import com.precisely.ApiResponse;
import com.precisely.Configuration;
import com.precisely.Pair;
import com.precisely.ProgressRequestBody;
import com.precisely.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.precisely.apis.model.ErrorInfo1;
import com.precisely.apis.model.MetadataResponse;
import com.precisely.apis.model.POIByGeometryRequest;
import com.precisely.apis.model.PlacesResponse;
import com.precisely.apis.model.Poi;
import com.precisely.apis.model.PoiCount;
import com.precisely.apis.model.PoiCountRequest;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PlacesServiceApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public PlacesServiceApi() {
this(Configuration.getDefaultApiClient());
}
public PlacesServiceApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
/**
* Build call for getCategoryCodeMetadata
* @param categoryCode 4, 6, or 11 digits category code to filter the response. (optional)
* @param level 1, 2, or 3. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getCategoryCodeMetadataCall(String categoryCode, String level, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/metadata/category";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (categoryCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("categoryCode", categoryCode));
}
if (level != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("level", level));
}
final String[] localVarAccepts = {
"application/json", "text/csv"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getCategoryCodeMetadataValidateBeforeCall(String categoryCode, String level, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getCategoryCodeMetadataCall(categoryCode, level, _callback);
return localVarCall;
}
/**
* Category Code Metadata.
* This service returns a list of Category codes & associated metadata which can then be used as inputs for querying the Points of Interest By Address or Location methods listed above.
* @param categoryCode 4, 6, or 11 digits category code to filter the response. (optional)
* @param level 1, 2, or 3. (optional)
* @return MetadataResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public MetadataResponse getCategoryCodeMetadata(String categoryCode, String level) throws ApiException {
ApiResponse localVarResp = getCategoryCodeMetadataWithHttpInfo(categoryCode, level);
return localVarResp.getData();
}
/**
* Category Code Metadata.
* This service returns a list of Category codes & associated metadata which can then be used as inputs for querying the Points of Interest By Address or Location methods listed above.
* @param categoryCode 4, 6, or 11 digits category code to filter the response. (optional)
* @param level 1, 2, or 3. (optional)
* @return ApiResponse<MetadataResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getCategoryCodeMetadataWithHttpInfo(String categoryCode, String level) throws ApiException {
okhttp3.Call localVarCall = getCategoryCodeMetadataValidateBeforeCall(categoryCode, level, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Category Code Metadata. (asynchronously)
* This service returns a list of Category codes & associated metadata which can then be used as inputs for querying the Points of Interest By Address or Location methods listed above.
* @param categoryCode 4, 6, or 11 digits category code to filter the response. (optional)
* @param level 1, 2, or 3. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getCategoryCodeMetadataAsync(String categoryCode, String level, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getCategoryCodeMetadataValidateBeforeCall(categoryCode, level, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPOIById
* @param id POI unique Identifier. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIByIdCall(String id, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/poi/{id}"
.replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPOIByIdValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getPOIById(Async)");
}
okhttp3.Call localVarCall = getPOIByIdCall(id, _callback);
return localVarCall;
}
/**
* Points Of Interest Details By Id
* This service returns complete details of a chosen point of interest by an identifier. The identifier could be selected from Autocomplete API response.
* @param id POI unique Identifier. (required)
* @return Poi
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public Poi getPOIById(String id) throws ApiException {
ApiResponse localVarResp = getPOIByIdWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Points Of Interest Details By Id
* This service returns complete details of a chosen point of interest by an identifier. The identifier could be selected from Autocomplete API response.
* @param id POI unique Identifier. (required)
* @return ApiResponse<Poi>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPOIByIdWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getPOIByIdValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Points Of Interest Details By Id (asynchronously)
* This service returns complete details of a chosen point of interest by an identifier. The identifier could be selected from Autocomplete API response.
* @param id POI unique Identifier. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIByIdAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIByIdValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPOIsByAddress
* @param address The address to be searched. (optional)
* @param country Country ISO code. (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByAddressCall(String address, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/poi/byaddress";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (address != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address));
}
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
if (name != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (categoryCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("categoryCode", categoryCode));
}
if (sicCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sicCode", sicCode));
}
if (maxCandidates != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxCandidates", maxCandidates));
}
if (searchRadius != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchRadius", searchRadius));
}
if (searchRadiusUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchRadiusUnit", searchRadiusUnit));
}
if (travelTime != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelTime", travelTime));
}
if (travelTimeUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelTimeUnit", travelTimeUnit));
}
if (travelDistance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelDistance", travelDistance));
}
if (travelDistanceUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelDistanceUnit", travelDistanceUnit));
}
if (travelMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelMode", travelMode));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (fuzzyOnName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("fuzzyOnName", fuzzyOnName));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (matchMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("matchMode", matchMode));
}
if (specificMatchOn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("specificMatchOn", specificMatchOn));
}
final String[] localVarAccepts = {
"application/json", "text/csv"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPOIsByAddressValidateBeforeCall(String address, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIsByAddressCall(address, country, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn, _callback);
return localVarCall;
}
/**
* Get POIs By Address.
* This service accepts an address as input and returns nearby points-of-interest places around that address. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download.
* @param address The address to be searched. (optional)
* @param country Country ISO code. (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @return PlacesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PlacesResponse getPOIsByAddress(String address, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn) throws ApiException {
ApiResponse localVarResp = getPOIsByAddressWithHttpInfo(address, country, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn);
return localVarResp.getData();
}
/**
* Get POIs By Address.
* This service accepts an address as input and returns nearby points-of-interest places around that address. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download.
* @param address The address to be searched. (optional)
* @param country Country ISO code. (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @return ApiResponse<PlacesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPOIsByAddressWithHttpInfo(String address, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn) throws ApiException {
okhttp3.Call localVarCall = getPOIsByAddressValidateBeforeCall(address, country, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get POIs By Address. (asynchronously)
* This service accepts an address as input and returns nearby points-of-interest places around that address. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download.
* @param address The address to be searched. (optional)
* @param country Country ISO code. (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByAddressAsync(String address, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIsByAddressValidateBeforeCall(address, country, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPOIsByArea
* @param areaName1 Specifies the largest geographical area, typically a state or province (optional)
* @param areaName3 Specifies a city or town name (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension (optional)
* @param country Country ISO code (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search (optional)
* @param type Filters the points of interest (POIs) by place types (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByAreaCall(String areaName1, String areaName3, String postcode1, String postcode2, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/poi/byarea";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (areaName1 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("areaName1", areaName1));
}
if (areaName3 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("areaName3", areaName3));
}
if (postcode1 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("postcode1", postcode1));
}
if (postcode2 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("postcode2", postcode2));
}
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
if (name != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (categoryCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("categoryCode", categoryCode));
}
if (sicCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sicCode", sicCode));
}
if (maxCandidates != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxCandidates", maxCandidates));
}
if (fuzzyOnName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("fuzzyOnName", fuzzyOnName));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (matchMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("matchMode", matchMode));
}
if (specificMatchOn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("specificMatchOn", specificMatchOn));
}
final String[] localVarAccepts = {
"application/json", "text/csv"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPOIsByAreaValidateBeforeCall(String areaName1, String areaName3, String postcode1, String postcode2, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIsByAreaCall(areaName1, areaName3, postcode1, postcode2, country, name, type, categoryCode, sicCode, maxCandidates, fuzzyOnName, page, matchMode, specificMatchOn, _callback);
return localVarCall;
}
/**
* GET Points Of Interest By Area.
* This service accepts city or postcode (alongwith country) and returns points-of-interest places within a city or postcode. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download.
* @param areaName1 Specifies the largest geographical area, typically a state or province (optional)
* @param areaName3 Specifies a city or town name (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension (optional)
* @param country Country ISO code (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search (optional)
* @param type Filters the points of interest (POIs) by place types (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode (optional)
* @return PlacesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PlacesResponse getPOIsByArea(String areaName1, String areaName3, String postcode1, String postcode2, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String fuzzyOnName, String page, String matchMode, String specificMatchOn) throws ApiException {
ApiResponse localVarResp = getPOIsByAreaWithHttpInfo(areaName1, areaName3, postcode1, postcode2, country, name, type, categoryCode, sicCode, maxCandidates, fuzzyOnName, page, matchMode, specificMatchOn);
return localVarResp.getData();
}
/**
* GET Points Of Interest By Area.
* This service accepts city or postcode (alongwith country) and returns points-of-interest places within a city or postcode. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download.
* @param areaName1 Specifies the largest geographical area, typically a state or province (optional)
* @param areaName3 Specifies a city or town name (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension (optional)
* @param country Country ISO code (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search (optional)
* @param type Filters the points of interest (POIs) by place types (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode (optional)
* @return ApiResponse<PlacesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPOIsByAreaWithHttpInfo(String areaName1, String areaName3, String postcode1, String postcode2, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String fuzzyOnName, String page, String matchMode, String specificMatchOn) throws ApiException {
okhttp3.Call localVarCall = getPOIsByAreaValidateBeforeCall(areaName1, areaName3, postcode1, postcode2, country, name, type, categoryCode, sicCode, maxCandidates, fuzzyOnName, page, matchMode, specificMatchOn, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* GET Points Of Interest By Area. (asynchronously)
* This service accepts city or postcode (alongwith country) and returns points-of-interest places within a city or postcode. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download.
* @param areaName1 Specifies the largest geographical area, typically a state or province (optional)
* @param areaName3 Specifies a city or town name (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension (optional)
* @param country Country ISO code (optional)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search (optional)
* @param type Filters the points of interest (POIs) by place types (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByAreaAsync(String areaName1, String areaName3, String postcode1, String postcode2, String country, String name, String type, String categoryCode, String sicCode, String maxCandidates, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIsByAreaValidateBeforeCall(areaName1, areaName3, postcode1, postcode2, country, name, type, categoryCode, sicCode, maxCandidates, fuzzyOnName, page, matchMode, specificMatchOn, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPOIsByGeometry
* @param poIByGeometryRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByGeometryCall(POIByGeometryRequest poIByGeometryRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = poIByGeometryRequest;
// create path and map variables
String localVarPath = "/places/v1/poi/byboundary";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "text/csv"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPOIsByGeometryValidateBeforeCall(POIByGeometryRequest poIByGeometryRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'poIByGeometryRequest' is set
if (poIByGeometryRequest == null) {
throw new ApiException("Missing the required parameter 'poIByGeometryRequest' when calling getPOIsByGeometry(Async)");
}
okhttp3.Call localVarCall = getPOIsByGeometryCall(poIByGeometryRequest, _callback);
return localVarCall;
}
/**
* Points Of Interest By Boundary
* Accepts a user-defined boundary as input and returns all Points of Interest within the boundary. Additionally, user can filter the response by name, type, standard industrial classifications and category codes.
* @param poIByGeometryRequest (required)
* @return PlacesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PlacesResponse getPOIsByGeometry(POIByGeometryRequest poIByGeometryRequest) throws ApiException {
ApiResponse localVarResp = getPOIsByGeometryWithHttpInfo(poIByGeometryRequest);
return localVarResp.getData();
}
/**
* Points Of Interest By Boundary
* Accepts a user-defined boundary as input and returns all Points of Interest within the boundary. Additionally, user can filter the response by name, type, standard industrial classifications and category codes.
* @param poIByGeometryRequest (required)
* @return ApiResponse<PlacesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPOIsByGeometryWithHttpInfo(POIByGeometryRequest poIByGeometryRequest) throws ApiException {
okhttp3.Call localVarCall = getPOIsByGeometryValidateBeforeCall(poIByGeometryRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Points Of Interest By Boundary (asynchronously)
* Accepts a user-defined boundary as input and returns all Points of Interest within the boundary. Additionally, user can filter the response by name, type, standard industrial classifications and category codes.
* @param poIByGeometryRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByGeometryAsync(POIByGeometryRequest poIByGeometryRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIsByGeometryValidateBeforeCall(poIByGeometryRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPOIsByLocation
* @param longitude Longitude of the location. (required)
* @param latitude Latitude of the location. (required)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsByLocationCall(String longitude, String latitude, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/poi/bylocation";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (longitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude));
}
if (latitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude));
}
if (name != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (categoryCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("categoryCode", categoryCode));
}
if (sicCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sicCode", sicCode));
}
if (maxCandidates != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxCandidates", maxCandidates));
}
if (searchRadius != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchRadius", searchRadius));
}
if (searchRadiusUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchRadiusUnit", searchRadiusUnit));
}
if (travelTime != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelTime", travelTime));
}
if (travelTimeUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelTimeUnit", travelTimeUnit));
}
if (travelDistance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelDistance", travelDistance));
}
if (travelDistanceUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelDistanceUnit", travelDistanceUnit));
}
if (travelMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelMode", travelMode));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (fuzzyOnName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("fuzzyOnName", fuzzyOnName));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (matchMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("matchMode", matchMode));
}
if (specificMatchOn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("specificMatchOn", specificMatchOn));
}
final String[] localVarAccepts = {
"application/json", "text/csv"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPOIsByLocationValidateBeforeCall(String longitude, String latitude, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'longitude' is set
if (longitude == null) {
throw new ApiException("Missing the required parameter 'longitude' when calling getPOIsByLocation(Async)");
}
// verify the required parameter 'latitude' is set
if (latitude == null) {
throw new ApiException("Missing the required parameter 'latitude' when calling getPOIsByLocation(Async)");
}
okhttp3.Call localVarCall = getPOIsByLocationCall(longitude, latitude, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn, _callback);
return localVarCall;
}
/**
* Get POIs By Location.
* This service accepts latitude/longitude as input and returns nearby points-of-interest places around that location. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download
* @param longitude Longitude of the location. (required)
* @param latitude Latitude of the location. (required)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @return PlacesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PlacesResponse getPOIsByLocation(String longitude, String latitude, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn) throws ApiException {
ApiResponse localVarResp = getPOIsByLocationWithHttpInfo(longitude, latitude, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn);
return localVarResp.getData();
}
/**
* Get POIs By Location.
* This service accepts latitude/longitude as input and returns nearby points-of-interest places around that location. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download
* @param longitude Longitude of the location. (required)
* @param latitude Latitude of the location. (required)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @return ApiResponse<PlacesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPOIsByLocationWithHttpInfo(String longitude, String latitude, String name, String type, String categoryCode, String sicCode, String maxCandidates, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String sortBy, String fuzzyOnName, String page, String matchMode, String specificMatchOn) throws ApiException {
okhttp3.Call localVarCall = getPOIsByLocationValidateBeforeCall(longitude, latitude, name, type, categoryCode, sicCode, maxCandidates, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, sortBy, fuzzyOnName, page, matchMode, specificMatchOn, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get POIs By Location. (asynchronously)
* This service accepts latitude/longitude as input and returns nearby points-of-interest places around that location. Additional input features include retrieving data by name, type, standard industrial classifications and category codes, as well as geographic filtering by radius, travel times and travel distances. Response features include JSON as well as CSV download
* @param longitude Longitude of the location. (required)
* @param latitude Latitude of the location. (required)
* @param name Specifies the name of the place (POI) to be searched. Also performs search on partially specified names. It requires minimum 3 characters to search. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved (optional)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional)
* @param sortBy Whether to sort the results based on relevance (best match) or by nearest distance from input location. (optional)
* @param fuzzyOnName Whether to allow fuzzy seacrh on name input. (optional)
* @param page Specifies the page number of results where page size is the value of maxCandidates input in request. (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
*/
public okhttp3.Call getPOIsCountCall(String contentType, PoiCountRequest poiCountRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = poiCountRequest;
// create path and map variables
String localVarPath = "/places/v1/poicount";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPOIsCountValidateBeforeCall(String contentType, PoiCountRequest poiCountRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling getPOIsCount(Async)");
}
// verify the required parameter 'poiCountRequest' is set
if (poiCountRequest == null) {
throw new ApiException("Missing the required parameter 'poiCountRequest' when calling getPOIsCount(Async)");
}
okhttp3.Call localVarCall = getPOIsCountCall(contentType, poiCountRequest, _callback);
return localVarCall;
}
/**
* Points Of Interest Count
* Accepts a user-defined boundary as input and returns the Count number of POIs within the boundary. Additionally, user can request the count of filtered POIs by name, type, standard industrial classifications and category codes within the given polygon.
* @param contentType (required)
* @param poiCountRequest (required)
* @return PoiCount
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PoiCount getPOIsCount(String contentType, PoiCountRequest poiCountRequest) throws ApiException {
ApiResponse localVarResp = getPOIsCountWithHttpInfo(contentType, poiCountRequest);
return localVarResp.getData();
}
/**
* Points Of Interest Count
* Accepts a user-defined boundary as input and returns the Count number of POIs within the boundary. Additionally, user can request the count of filtered POIs by name, type, standard industrial classifications and category codes within the given polygon.
* @param contentType (required)
* @param poiCountRequest (required)
* @return ApiResponse<PoiCount>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPOIsCountWithHttpInfo(String contentType, PoiCountRequest poiCountRequest) throws ApiException {
okhttp3.Call localVarCall = getPOIsCountValidateBeforeCall(contentType, poiCountRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Points Of Interest Count (asynchronously)
* Accepts a user-defined boundary as input and returns the Count number of POIs within the boundary. Additionally, user can request the count of filtered POIs by name, type, standard industrial classifications and category codes within the given polygon.
* @param contentType (required)
* @param poiCountRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPOIsCountAsync(String contentType, PoiCountRequest poiCountRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPOIsCountValidateBeforeCall(contentType, poiCountRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSICMetadata
* @param sicCode 4 or 8 digits SIC code to filter the response. (optional)
* @param level 1 or 2. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getSICMetadataCall(String sicCode, String level, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/metadata/sic";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (sicCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sicCode", sicCode));
}
if (level != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("level", level));
}
final String[] localVarAccepts = {
"application/json", "text/csv"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSICMetadataValidateBeforeCall(String sicCode, String level, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSICMetadataCall(sicCode, level, _callback);
return localVarCall;
}
/**
* Get SIC Metadata
* This service returns a list of standard industrial classification codes & associated metadata which can then be used as inputs for querying the Points of Interest By Address or Location methods listed above.
* @param sicCode 4 or 8 digits SIC code to filter the response. (optional)
* @param level 1 or 2. (optional)
* @return MetadataResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public MetadataResponse getSICMetadata(String sicCode, String level) throws ApiException {
ApiResponse localVarResp = getSICMetadataWithHttpInfo(sicCode, level);
return localVarResp.getData();
}
/**
* Get SIC Metadata
* This service returns a list of standard industrial classification codes & associated metadata which can then be used as inputs for querying the Points of Interest By Address or Location methods listed above.
* @param sicCode 4 or 8 digits SIC code to filter the response. (optional)
* @param level 1 or 2. (optional)
* @return ApiResponse<MetadataResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getSICMetadataWithHttpInfo(String sicCode, String level) throws ApiException {
okhttp3.Call localVarCall = getSICMetadataValidateBeforeCall(sicCode, level, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get SIC Metadata (asynchronously)
* This service returns a list of standard industrial classification codes & associated metadata which can then be used as inputs for querying the Points of Interest By Address or Location methods listed above.
* @param sicCode 4 or 8 digits SIC code to filter the response. (optional)
* @param level 1 or 2. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getSICMetadataAsync(String sicCode, String level, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSICMetadataValidateBeforeCall(sicCode, level, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for poisAutocomplete
* @param xForwardedFor (optional)
* @param longitude Longitude of the location. (optional)
* @param latitude Latitude of the location. (optional)
* @param searchText Free text which will accept a multi-word string. Combination of POI name and address is possible. (optional)
* @param searchOnNameOnly (optional, default to N)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param country Country ISO code. (optional)
* @param areaName1 Specifies the largest geographical area, typically a state or province. (optional)
* @param areaName3 Specifies a city or town name. (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country. (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension. (optional)
* @param ipAddress IP address which will be used to auto detect the location in order to serve contextually relevant results. (optional)
* @param autoDetectLocation Specifies whether to detect client's location using IP address. If IP address(below) is not provided and autoDetectLocation is set 'True' then IP address will be picked from HTTP request automatically. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values. (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved. (optional)
* @param sortBy sortBy (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call poisAutocompleteCall(String xForwardedFor, String longitude, String latitude, String searchText, String searchOnNameOnly, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String areaName1, String areaName3, String postcode1, String postcode2, String ipAddress, String autoDetectLocation, String type, String categoryCode, String sicCode, String maxCandidates, String sortBy, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/places/v1/poi/autocomplete";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (longitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude));
}
if (latitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude));
}
if (searchText != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchText", searchText));
}
if (searchOnNameOnly != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchOnNameOnly", searchOnNameOnly));
}
if (searchRadius != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchRadius", searchRadius));
}
if (searchRadiusUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("searchRadiusUnit", searchRadiusUnit));
}
if (travelTime != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelTime", travelTime));
}
if (travelTimeUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelTimeUnit", travelTimeUnit));
}
if (travelDistance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelDistance", travelDistance));
}
if (travelDistanceUnit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelDistanceUnit", travelDistanceUnit));
}
if (travelMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("travelMode", travelMode));
}
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
if (areaName1 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("areaName1", areaName1));
}
if (areaName3 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("areaName3", areaName3));
}
if (postcode1 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("postcode1", postcode1));
}
if (postcode2 != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("postcode2", postcode2));
}
if (ipAddress != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("ipAddress", ipAddress));
}
if (autoDetectLocation != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("autoDetectLocation", autoDetectLocation));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (categoryCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("categoryCode", categoryCode));
}
if (sicCode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sicCode", sicCode));
}
if (maxCandidates != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxCandidates", maxCandidates));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (matchMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("matchMode", matchMode));
}
if (specificMatchOn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("specificMatchOn", specificMatchOn));
}
if (xForwardedFor != null) {
localVarHeaderParams.put("X-Forwarded-For", localVarApiClient.parameterToString(xForwardedFor));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call poisAutocompleteValidateBeforeCall(String xForwardedFor, String longitude, String latitude, String searchText, String searchOnNameOnly, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String areaName1, String areaName3, String postcode1, String postcode2, String ipAddress, String autoDetectLocation, String type, String categoryCode, String sicCode, String maxCandidates, String sortBy, String matchMode, String specificMatchOn, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = poisAutocompleteCall(xForwardedFor, longitude, latitude, searchText, searchOnNameOnly, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, areaName1, areaName3, postcode1, postcode2, ipAddress, autoDetectLocation, type, categoryCode, sicCode, maxCandidates, sortBy, matchMode, specificMatchOn, _callback);
return localVarCall;
}
/**
* Points Of Interest Autocomplete
* This service accepts partial text input and returns matching points of interest, sorted by relevance or distance.
* @param xForwardedFor (optional)
* @param longitude Longitude of the location. (optional)
* @param latitude Latitude of the location. (optional)
* @param searchText Free text which will accept a multi-word string. Combination of POI name and address is possible. (optional)
* @param searchOnNameOnly (optional, default to N)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param country Country ISO code. (optional)
* @param areaName1 Specifies the largest geographical area, typically a state or province. (optional)
* @param areaName3 Specifies a city or town name. (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country. (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension. (optional)
* @param ipAddress IP address which will be used to auto detect the location in order to serve contextually relevant results. (optional)
* @param autoDetectLocation Specifies whether to detect client's location using IP address. If IP address(below) is not provided and autoDetectLocation is set 'True' then IP address will be picked from HTTP request automatically. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values. (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved. (optional)
* @param sortBy sortBy (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @return PlacesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PlacesResponse poisAutocomplete(String xForwardedFor, String longitude, String latitude, String searchText, String searchOnNameOnly, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String areaName1, String areaName3, String postcode1, String postcode2, String ipAddress, String autoDetectLocation, String type, String categoryCode, String sicCode, String maxCandidates, String sortBy, String matchMode, String specificMatchOn) throws ApiException {
ApiResponse localVarResp = poisAutocompleteWithHttpInfo(xForwardedFor, longitude, latitude, searchText, searchOnNameOnly, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, areaName1, areaName3, postcode1, postcode2, ipAddress, autoDetectLocation, type, categoryCode, sicCode, maxCandidates, sortBy, matchMode, specificMatchOn);
return localVarResp.getData();
}
/**
* Points Of Interest Autocomplete
* This service accepts partial text input and returns matching points of interest, sorted by relevance or distance.
* @param xForwardedFor (optional)
* @param longitude Longitude of the location. (optional)
* @param latitude Latitude of the location. (optional)
* @param searchText Free text which will accept a multi-word string. Combination of POI name and address is possible. (optional)
* @param searchOnNameOnly (optional, default to N)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param country Country ISO code. (optional)
* @param areaName1 Specifies the largest geographical area, typically a state or province. (optional)
* @param areaName3 Specifies a city or town name. (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country. (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension. (optional)
* @param ipAddress IP address which will be used to auto detect the location in order to serve contextually relevant results. (optional)
* @param autoDetectLocation Specifies whether to detect client's location using IP address. If IP address(below) is not provided and autoDetectLocation is set 'True' then IP address will be picked from HTTP request automatically. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values. (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved. (optional)
* @param sortBy sortBy (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @return ApiResponse<PlacesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse poisAutocompleteWithHttpInfo(String xForwardedFor, String longitude, String latitude, String searchText, String searchOnNameOnly, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String areaName1, String areaName3, String postcode1, String postcode2, String ipAddress, String autoDetectLocation, String type, String categoryCode, String sicCode, String maxCandidates, String sortBy, String matchMode, String specificMatchOn) throws ApiException {
okhttp3.Call localVarCall = poisAutocompleteValidateBeforeCall(xForwardedFor, longitude, latitude, searchText, searchOnNameOnly, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, areaName1, areaName3, postcode1, postcode2, ipAddress, autoDetectLocation, type, categoryCode, sicCode, maxCandidates, sortBy, matchMode, specificMatchOn, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Points Of Interest Autocomplete (asynchronously)
* This service accepts partial text input and returns matching points of interest, sorted by relevance or distance.
* @param xForwardedFor (optional)
* @param longitude Longitude of the location. (optional)
* @param latitude Latitude of the location. (optional)
* @param searchText Free text which will accept a multi-word string. Combination of POI name and address is possible. (optional)
* @param searchOnNameOnly (optional, default to N)
* @param searchRadius Radius range within which search is performed. (optional)
* @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (default). (optional)
* @param travelTime Travel time within which search is performed (POIs which can be reached within travel time). (optional)
* @param travelTimeUnit Travel time unit such as minutes (default), hours, seconds or milliseconds. (optional)
* @param travelDistance Travel distance within which search is performed (POIs which can be reached within travel distance). (optional)
* @param travelDistanceUnit Travel distance unit such as Feet (default), Kilometers, Miles or Meters. (optional)
* @param travelMode Mode of commute. (optional, default to driving)
* @param country Country ISO code. (optional)
* @param areaName1 Specifies the largest geographical area, typically a state or province. (optional)
* @param areaName3 Specifies a city or town name. (optional)
* @param postcode1 Specifies the postcode(ZIP code) in the appropriate format for the country. (optional)
* @param postcode2 Specifies the postcode(ZIP code) extension. (optional)
* @param ipAddress IP address which will be used to auto detect the location in order to serve contextually relevant results. (optional)
* @param autoDetectLocation Specifies whether to detect client's location using IP address. If IP address(below) is not provided and autoDetectLocation is set 'True' then IP address will be picked from HTTP request automatically. (optional)
* @param type Filters the points of interest (POIs) by place types. (optional)
* @param categoryCode Acts as a filter to narrow down and refine POI search results. The category codes are unique 4, 6, or 11 digit numeric values. (optional)
* @param sicCode Acts as a filter to narrow down and refine POI search results. The SIC codes are unique 4 or 8 digit numerical values. (optional)
* @param maxCandidates Maximum number of POIs that can be retrieved. (optional)
* @param sortBy sortBy (optional)
* @param matchMode Determine the leniency used to make a match between the input name and the reference data. (optional)
* @param specificMatchOn Specifies the field for the Specific Match Mode. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details