All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.precisely.apis.DemographicsServiceApi Maven / Gradle / Ivy

Go to download

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.

The newest version!
/*
 * 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.Demographics;
import com.precisely.apis.model.DemographicsAdvancedRequest;
import com.precisely.apis.model.ErrorInfo1;
import com.precisely.apis.model.Segmentation;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DemographicsServiceApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public DemographicsServiceApi() {
        this(Configuration.getDefaultApiClient());
    }

    public DemographicsServiceApi(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 getDemographicsAdvanced
     * @param demographicsAdvancedRequest  (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 getDemographicsAdvancedCall(DemographicsAdvancedRequest demographicsAdvancedRequest, 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 = demographicsAdvancedRequest; // create path and map variables String localVarPath = "/demographics-segmentation/v1/advanced/demographics"; 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 = { "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 getDemographicsAdvancedValidateBeforeCall(DemographicsAdvancedRequest demographicsAdvancedRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'demographicsAdvancedRequest' is set if (demographicsAdvancedRequest == null) { throw new ApiException("Missing the required parameter 'demographicsAdvancedRequest' when calling getDemographicsAdvanced(Async)"); } okhttp3.Call localVarCall = getDemographicsAdvancedCall(demographicsAdvancedRequest, _callback); return localVarCall; } /** * Demographics Advanced Endpoint * Demographics Advanced Endpoint will return the aggregated values of the selected demographics variables of the regions falling inside a user provided geometry or travel time/distance boundaries. All the intersecting demographic boundaries will be snapped completely, and user will have option to request these boundaries in response. * @param demographicsAdvancedRequest (required) * @return Demographics * @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 Demographics getDemographicsAdvanced(DemographicsAdvancedRequest demographicsAdvancedRequest) throws ApiException { ApiResponse localVarResp = getDemographicsAdvancedWithHttpInfo(demographicsAdvancedRequest); return localVarResp.getData(); } /** * Demographics Advanced Endpoint * Demographics Advanced Endpoint will return the aggregated values of the selected demographics variables of the regions falling inside a user provided geometry or travel time/distance boundaries. All the intersecting demographic boundaries will be snapped completely, and user will have option to request these boundaries in response. * @param demographicsAdvancedRequest (required) * @return ApiResponse<Demographics> * @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 getDemographicsAdvancedWithHttpInfo(DemographicsAdvancedRequest demographicsAdvancedRequest) throws ApiException { okhttp3.Call localVarCall = getDemographicsAdvancedValidateBeforeCall(demographicsAdvancedRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Demographics Advanced Endpoint (asynchronously) * Demographics Advanced Endpoint will return the aggregated values of the selected demographics variables of the regions falling inside a user provided geometry or travel time/distance boundaries. All the intersecting demographic boundaries will be snapped completely, and user will have option to request these boundaries in response. * @param demographicsAdvancedRequest (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 getDemographicsAdvancedAsync(DemographicsAdvancedRequest demographicsAdvancedRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsAdvancedValidateBeforeCall(demographicsAdvancedRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDemographicsBasic * @param address Address to be searched (optional) * @param longitude Longitude of the location (optional) * @param latitude Latitude of the location (optional) * @param searchRadius Radius within which demographics details are required. Max. value is 52800 Feet or 10 miles (optional) * @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (optional) * @param travelTime Travel Time based on ‘travelMode’ within which demographics details are required. Max. value is 1 hour. (optional) * @param travelTimeUnit minutes,hours,seconds,milliseconds. Default is meters.Default is minutes. (optional) * @param travelDistance Travel Distance based on ‘travelMode’ within which demographics details are required. Max. value is 10 miles. (optional) * @param travelDistanceUnit feet,kilometers,miles,meters. Default is feet. (optional) * @param travelMode Default is driving. (optional) * @param country 3 digit ISO country code (Used in case address is mentioned). (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter If Y, demographic boundaries are returned in response. (optional) * @param includeGeometry (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 getDemographicsBasicCall(String address, String longitude, String latitude, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String profile, String filter, String includeGeometry, 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 = "/demographics-segmentation/v1/basic/demographics"; 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 (longitude != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude)); } if (latitude != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude)); } 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 (profile != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("profile", profile)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (includeGeometry != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeGeometry", includeGeometry)); } 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 getDemographicsBasicValidateBeforeCall(String address, String longitude, String latitude, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String profile, String filter, String includeGeometry, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsBasicCall(address, longitude, latitude, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, profile, filter, includeGeometry, _callback); return localVarCall; } /** * Demographics Basic * Demographics Basic Endpoint will return the aggregated values of the selected demographics variables of the regions falling inside the search radius. All the intersecting demographic boundaries will be snapped completely and user will have option to request these boundaries in response. * @param address Address to be searched (optional) * @param longitude Longitude of the location (optional) * @param latitude Latitude of the location (optional) * @param searchRadius Radius within which demographics details are required. Max. value is 52800 Feet or 10 miles (optional) * @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (optional) * @param travelTime Travel Time based on ‘travelMode’ within which demographics details are required. Max. value is 1 hour. (optional) * @param travelTimeUnit minutes,hours,seconds,milliseconds. Default is meters.Default is minutes. (optional) * @param travelDistance Travel Distance based on ‘travelMode’ within which demographics details are required. Max. value is 10 miles. (optional) * @param travelDistanceUnit feet,kilometers,miles,meters. Default is feet. (optional) * @param travelMode Default is driving. (optional) * @param country 3 digit ISO country code (Used in case address is mentioned). (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter If Y, demographic boundaries are returned in response. (optional) * @param includeGeometry (optional) * @return Demographics * @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 Demographics getDemographicsBasic(String address, String longitude, String latitude, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String profile, String filter, String includeGeometry) throws ApiException { ApiResponse localVarResp = getDemographicsBasicWithHttpInfo(address, longitude, latitude, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, profile, filter, includeGeometry); return localVarResp.getData(); } /** * Demographics Basic * Demographics Basic Endpoint will return the aggregated values of the selected demographics variables of the regions falling inside the search radius. All the intersecting demographic boundaries will be snapped completely and user will have option to request these boundaries in response. * @param address Address to be searched (optional) * @param longitude Longitude of the location (optional) * @param latitude Latitude of the location (optional) * @param searchRadius Radius within which demographics details are required. Max. value is 52800 Feet or 10 miles (optional) * @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (optional) * @param travelTime Travel Time based on ‘travelMode’ within which demographics details are required. Max. value is 1 hour. (optional) * @param travelTimeUnit minutes,hours,seconds,milliseconds. Default is meters.Default is minutes. (optional) * @param travelDistance Travel Distance based on ‘travelMode’ within which demographics details are required. Max. value is 10 miles. (optional) * @param travelDistanceUnit feet,kilometers,miles,meters. Default is feet. (optional) * @param travelMode Default is driving. (optional) * @param country 3 digit ISO country code (Used in case address is mentioned). (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter If Y, demographic boundaries are returned in response. (optional) * @param includeGeometry (optional) * @return ApiResponse<Demographics> * @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 getDemographicsBasicWithHttpInfo(String address, String longitude, String latitude, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String profile, String filter, String includeGeometry) throws ApiException { okhttp3.Call localVarCall = getDemographicsBasicValidateBeforeCall(address, longitude, latitude, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, profile, filter, includeGeometry, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Demographics Basic (asynchronously) * Demographics Basic Endpoint will return the aggregated values of the selected demographics variables of the regions falling inside the search radius. All the intersecting demographic boundaries will be snapped completely and user will have option to request these boundaries in response. * @param address Address to be searched (optional) * @param longitude Longitude of the location (optional) * @param latitude Latitude of the location (optional) * @param searchRadius Radius within which demographics details are required. Max. value is 52800 Feet or 10 miles (optional) * @param searchRadiusUnit Radius unit such as Feet, Kilometers, Miles or Meters (optional) * @param travelTime Travel Time based on ‘travelMode’ within which demographics details are required. Max. value is 1 hour. (optional) * @param travelTimeUnit minutes,hours,seconds,milliseconds. Default is meters.Default is minutes. (optional) * @param travelDistance Travel Distance based on ‘travelMode’ within which demographics details are required. Max. value is 10 miles. (optional) * @param travelDistanceUnit feet,kilometers,miles,meters. Default is feet. (optional) * @param travelMode Default is driving. (optional) * @param country 3 digit ISO country code (Used in case address is mentioned). (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter If Y, demographic boundaries are returned in response. (optional) * @param includeGeometry (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 getDemographicsBasicAsync(String address, String longitude, String latitude, String searchRadius, String searchRadiusUnit, String travelTime, String travelTimeUnit, String travelDistance, String travelDistanceUnit, String travelMode, String country, String profile, String filter, String includeGeometry, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsBasicValidateBeforeCall(address, longitude, latitude, searchRadius, searchRadiusUnit, travelTime, travelTimeUnit, travelDistance, travelDistanceUnit, travelMode, country, profile, filter, includeGeometry, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDemographicsByAddress * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,AUS. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (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 getDemographicsByAddressCall(String address, String country, String profile, String filter, String valueFormat, String variableLevel, 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 = "/demographics-segmentation/v1/demographics/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 (profile != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("profile", profile)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (valueFormat != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("valueFormat", valueFormat)); } if (variableLevel != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("variableLevel", variableLevel)); } 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 getDemographicsByAddressValidateBeforeCall(String address, String country, String profile, String filter, String valueFormat, String variableLevel, final ApiCallback _callback) throws ApiException { // verify the required parameter 'address' is set if (address == null) { throw new ApiException("Missing the required parameter 'address' when calling getDemographicsByAddress(Async)"); } okhttp3.Call localVarCall = getDemographicsByAddressCall(address, country, profile, filter, valueFormat, variableLevel, _callback); return localVarCall; } /** * Demographics By Address. * Provides the demographic details around a specified address. GeoLife 'byaddress' service accepts address as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more. * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,AUS. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (optional) * @return Demographics * @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 Demographics getDemographicsByAddress(String address, String country, String profile, String filter, String valueFormat, String variableLevel) throws ApiException { ApiResponse localVarResp = getDemographicsByAddressWithHttpInfo(address, country, profile, filter, valueFormat, variableLevel); return localVarResp.getData(); } /** * Demographics By Address. * Provides the demographic details around a specified address. GeoLife 'byaddress' service accepts address as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more. * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,AUS. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (optional) * @return ApiResponse<Demographics> * @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 getDemographicsByAddressWithHttpInfo(String address, String country, String profile, String filter, String valueFormat, String variableLevel) throws ApiException { okhttp3.Call localVarCall = getDemographicsByAddressValidateBeforeCall(address, country, profile, filter, valueFormat, variableLevel, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Demographics By Address. (asynchronously) * Provides the demographic details around a specified address. GeoLife 'byaddress' service accepts address as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more. * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,AUS. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (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 getDemographicsByAddressAsync(String address, String country, String profile, String filter, String valueFormat, String variableLevel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsByAddressValidateBeforeCall(address, country, profile, filter, valueFormat, variableLevel, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDemographicsByBoundaryIds * @param boundaryIds Accepts comma separated multiple boundary ids. (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter Accept the comma separated theme names and filter response based on value. Maximum 10 can be provided. (optional) * @param valueFormat Applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel Retrieves demographic facts in response based on the input value. (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 getDemographicsByBoundaryIdsCall(String boundaryIds, String profile, String filter, String valueFormat, String variableLevel, 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 = "/demographics-segmentation/v1/demographics/byboundaryids"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (boundaryIds != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("boundaryIds", boundaryIds)); } if (profile != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("profile", profile)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (valueFormat != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("valueFormat", valueFormat)); } if (variableLevel != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("variableLevel", variableLevel)); } 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 getDemographicsByBoundaryIdsValidateBeforeCall(String boundaryIds, String profile, String filter, String valueFormat, String variableLevel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsByBoundaryIdsCall(boundaryIds, profile, filter, valueFormat, variableLevel, _callback); return localVarCall; } /** * Demographics By Boundaryids. * This endpoint will allow the user to request demographics details by census boundary id. Multiple comma separated boundary ids will be accepted. * @param boundaryIds Accepts comma separated multiple boundary ids. (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter Accept the comma separated theme names and filter response based on value. Maximum 10 can be provided. (optional) * @param valueFormat Applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel Retrieves demographic facts in response based on the input value. (optional) * @return Demographics * @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 Demographics getDemographicsByBoundaryIds(String boundaryIds, String profile, String filter, String valueFormat, String variableLevel) throws ApiException { ApiResponse localVarResp = getDemographicsByBoundaryIdsWithHttpInfo(boundaryIds, profile, filter, valueFormat, variableLevel); return localVarResp.getData(); } /** * Demographics By Boundaryids. * This endpoint will allow the user to request demographics details by census boundary id. Multiple comma separated boundary ids will be accepted. * @param boundaryIds Accepts comma separated multiple boundary ids. (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter Accept the comma separated theme names and filter response based on value. Maximum 10 can be provided. (optional) * @param valueFormat Applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel Retrieves demographic facts in response based on the input value. (optional) * @return ApiResponse<Demographics> * @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 getDemographicsByBoundaryIdsWithHttpInfo(String boundaryIds, String profile, String filter, String valueFormat, String variableLevel) throws ApiException { okhttp3.Call localVarCall = getDemographicsByBoundaryIdsValidateBeforeCall(boundaryIds, profile, filter, valueFormat, variableLevel, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Demographics By Boundaryids. (asynchronously) * This endpoint will allow the user to request demographics details by census boundary id. Multiple comma separated boundary ids will be accepted. * @param boundaryIds Accepts comma separated multiple boundary ids. (optional) * @param profile Applicable on ranged variables. Returns top sorted result based on the input value. (optional) * @param filter Accept the comma separated theme names and filter response based on value. Maximum 10 can be provided. (optional) * @param valueFormat Applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel Retrieves demographic facts in response based on the input value. (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 getDemographicsByBoundaryIdsAsync(String boundaryIds, String profile, String filter, String valueFormat, String variableLevel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsByBoundaryIdsValidateBeforeCall(boundaryIds, profile, filter, valueFormat, variableLevel, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDemographicsByLocation * @param longitude Longitude of the location. (optional) * @param latitude Latitude of the location. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (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 getDemographicsByLocationCall(String longitude, String latitude, String profile, String filter, String valueFormat, String variableLevel, 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 = "/demographics-segmentation/v1/demographics/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 (profile != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("profile", profile)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (valueFormat != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("valueFormat", valueFormat)); } if (variableLevel != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("variableLevel", variableLevel)); } 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 getDemographicsByLocationValidateBeforeCall(String longitude, String latitude, String profile, String filter, String valueFormat, String variableLevel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsByLocationCall(longitude, latitude, profile, filter, valueFormat, variableLevel, _callback); return localVarCall; } /** * Demographics By Location. * Provides the demographic details around a specified location. GeoLife 'bylocation' service accepts longitude and latitude as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more. * @param longitude Longitude of the location. (optional) * @param latitude Latitude of the location. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (optional) * @return Demographics * @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 Demographics getDemographicsByLocation(String longitude, String latitude, String profile, String filter, String valueFormat, String variableLevel) throws ApiException { ApiResponse localVarResp = getDemographicsByLocationWithHttpInfo(longitude, latitude, profile, filter, valueFormat, variableLevel); return localVarResp.getData(); } /** * Demographics By Location. * Provides the demographic details around a specified location. GeoLife 'bylocation' service accepts longitude and latitude as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more. * @param longitude Longitude of the location. (optional) * @param latitude Latitude of the location. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (optional) * @return ApiResponse<Demographics> * @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 getDemographicsByLocationWithHttpInfo(String longitude, String latitude, String profile, String filter, String valueFormat, String variableLevel) throws ApiException { okhttp3.Call localVarCall = getDemographicsByLocationValidateBeforeCall(longitude, latitude, profile, filter, valueFormat, variableLevel, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Demographics By Location. (asynchronously) * Provides the demographic details around a specified location. GeoLife 'bylocation' service accepts longitude and latitude as an input to return a specific population segment's age group, ethnicity, income, purchasing behaviour, commuter patterns and more. * @param longitude Longitude of the location. (optional) * @param latitude Latitude of the location. (optional) * @param profile Retrieves the sorted demographic data on the basis of pre-defined profiles that can display the top 3 or top 5 results (by location) either in ascending or descending order.Allowed values Top5Ascending,Top5Descending,Top3Ascending,Top3Descending (optional) * @param filter The 'filter' parameter retrieves the demographic data based upon specified input themes. (optional) * @param valueFormat The 'valueFormat' parameter is applicable for few ranged variables where percent & count both are available and filter response based on the input value. (optional) * @param variableLevel The 'variableLevel' retrieves demographic facts in response based on the input value (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 getDemographicsByLocationAsync(String longitude, String latitude, String profile, String filter, String valueFormat, String variableLevel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDemographicsByLocationValidateBeforeCall(longitude, latitude, profile, filter, valueFormat, variableLevel, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSegmentationByAddress * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,FRA,ITA,AUS,DEU. (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 getSegmentationByAddressCall(String address, String country, 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 = "/demographics-segmentation/v1/segmentation/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)); } 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 getSegmentationByAddressValidateBeforeCall(String address, String country, final ApiCallback _callback) throws ApiException { // verify the required parameter 'address' is set if (address == null) { throw new ApiException("Missing the required parameter 'address' when calling getSegmentationByAddress(Async)"); } okhttp3.Call localVarCall = getSegmentationByAddressCall(address, country, _callback); return localVarCall; } /** * Segmentation By Address. * Provides the segmentation details around a specified address. GeoLife 'Segmentation by Address' service accepts address as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests. * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,FRA,ITA,AUS,DEU. (optional) * @return Segmentation * @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 Segmentation getSegmentationByAddress(String address, String country) throws ApiException { ApiResponse localVarResp = getSegmentationByAddressWithHttpInfo(address, country); return localVarResp.getData(); } /** * Segmentation By Address. * Provides the segmentation details around a specified address. GeoLife 'Segmentation by Address' service accepts address as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests. * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,FRA,ITA,AUS,DEU. (optional) * @return ApiResponse<Segmentation> * @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 getSegmentationByAddressWithHttpInfo(String address, String country) throws ApiException { okhttp3.Call localVarCall = getSegmentationByAddressValidateBeforeCall(address, country, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Segmentation By Address. (asynchronously) * Provides the segmentation details around a specified address. GeoLife 'Segmentation by Address' service accepts address as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests. * @param address The address to be searched. (required) * @param country 3 letter ISO code of the country to be searched.Allowed values USA,CAN,GBR,FRA,ITA,AUS,DEU. (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 getSegmentationByAddressAsync(String address, String country, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSegmentationByAddressValidateBeforeCall(address, country, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSegmentationByLocation * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (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 getSegmentationByLocationCall(String longitude, String latitude, 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 = "/demographics-segmentation/v1/segmentation/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)); } 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 getSegmentationByLocationValidateBeforeCall(String longitude, String latitude, 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 getSegmentationByLocation(Async)"); } // verify the required parameter 'latitude' is set if (latitude == null) { throw new ApiException("Missing the required parameter 'latitude' when calling getSegmentationByLocation(Async)"); } okhttp3.Call localVarCall = getSegmentationByLocationCall(longitude, latitude, _callback); return localVarCall; } /** * Segmentation By Location. * Provides the segmentation details around a specified location. GeoLife 'segmentation bylocation' service accepts longitude and latitude as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (required) * @return Segmentation * @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 Segmentation getSegmentationByLocation(String longitude, String latitude) throws ApiException { ApiResponse localVarResp = getSegmentationByLocationWithHttpInfo(longitude, latitude); return localVarResp.getData(); } /** * Segmentation By Location. * Provides the segmentation details around a specified location. GeoLife 'segmentation bylocation' service accepts longitude and latitude as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (required) * @return ApiResponse<Segmentation> * @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 getSegmentationByLocationWithHttpInfo(String longitude, String latitude) throws ApiException { okhttp3.Call localVarCall = getSegmentationByLocationValidateBeforeCall(longitude, latitude, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Segmentation By Location. (asynchronously) * Provides the segmentation details around a specified location. GeoLife 'segmentation bylocation' service accepts longitude and latitude as an input to return the lifestyle characteristics of households in terms of their family status, children characteristics, income behaviors, financial preferences and interests. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (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 getSegmentationByLocationAsync(String longitude, String latitude, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSegmentationByLocationValidateBeforeCall(longitude, latitude, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy