com.kucoin.sdk.rest.adapter.CurrencyAPIAdaptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kucoin-java-sdk Show documentation
Show all versions of kucoin-java-sdk Show documentation
Fixed fork of the official Kucoin SDK
The newest version!
/**
* Copyright 2019 Mek Global Limited.
*/
package com.kucoin.sdk.rest.adapter;
import com.kucoin.sdk.rest.impl.retrofit.PublicRetrofitAPIImpl;
import com.kucoin.sdk.rest.interfaces.CurrencyAPI;
import com.kucoin.sdk.rest.interfaces.retrofit.CurrencyAPIRetrofit;
import com.kucoin.sdk.rest.response.CurrencyDetailResponse;
import com.kucoin.sdk.rest.response.CurrencyResponse;
import java.io.IOException;
import java.util.List;
/**
* Created by chenshiwei on 2019/1/15.
*/
public class CurrencyAPIAdaptor extends PublicRetrofitAPIImpl implements CurrencyAPI {
public CurrencyAPIAdaptor(String baseUrl) {
this.baseUrl = baseUrl;
}
@Override
public List getCurrencies() throws IOException {
return super.executeSync(getAPIImpl().getCurrencies());
}
@Override
public CurrencyDetailResponse getCurrencyDetail(String currency) throws IOException {
return super.executeSync(getAPIImpl().getCurrencyDetail(currency));
}
}