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

com.clarolab.bamboo.client.BambooClient Maven / Gradle / Ivy

package com.clarolab.bamboo.client;

import com.clarolab.bamboo.utils.Constants;
import lombok.Builder;
import lombok.Data;
import lombok.extern.java.Log;

@Data
@Log
public abstract class BambooClient {

    private BambooApiClient bambooApiClient;
    private int limitResults;

    public BambooClient(BambooApiClient bambooApiClient, int limitResults){
        this.bambooApiClient = bambooApiClient;
        if(limitResults == 0)
            //Recover first 10 results as default
            this.limitResults = Constants.AMOUNT_OF_ELEMENTS_TO_GET;
        else
            this.limitResults = limitResults;
    }

    public  T perform(String request, Class classOfT) throws Exception {
        return bambooApiClient.getHttpClient().get(request, classOfT);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy