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

com.wirefreethought.geodb.client.net.GeoDbApiClient Maven / Gradle / Ivy

package com.wirefreethought.geodb.client.net;

import java.util.List;
import java.util.Map;

import com.squareup.okhttp.Call;
import com.wirefreethought.geodb.client.model.GeoDbInstanceType;
import com.wirefreethought.geodb.client.net.ProgressRequestBody.ProgressRequestListener;

/**
 * Use this client in place of the swagger-codegen-generated ApiClient. It implements a workaround for an authorization issue in that class.
 *
 * @author mmogley
 */
public class GeoDbApiClient extends ApiClient
{
    private static final String[] AUTH_NAMES = new String[] {
        "UserSecurity"
    };

    public GeoDbApiClient(GeoDbInstanceType type)
    {
        this(type.getInstanceUri());
    }

    public GeoDbApiClient(String instanceUri) {

        super();

        setBasePath(instanceUri);
    }

    @Override
    public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams,
        Map formParams, String[] authNames, ProgressRequestListener progressRequestListener) throws ApiException
    {
        return super.buildCall(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, AUTH_NAMES, progressRequestListener);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy