|
|
@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.JavaType;
|
|
|
|
import com.fasterxml.jackson.databind.type.TypeFactory;
|
|
|
|
import com.fasterxml.jackson.databind.type.TypeFactory;
|
|
|
|
import org.goudham.me.api.entity.series.FilteredSeries;
|
|
|
|
import org.goudham.me.api.entity.series.FilteredSeries;
|
|
|
|
import org.goudham.me.api.entity.series.Series;
|
|
|
|
import org.goudham.me.api.entity.series.Series;
|
|
|
|
|
|
|
|
import org.goudham.me.api.entity.waifu.FilteredWaifu;
|
|
|
|
import org.goudham.me.api.entity.waifu.Waifu;
|
|
|
|
import org.goudham.me.api.entity.waifu.Waifu;
|
|
|
|
import org.goudham.me.exception.APIMapperException;
|
|
|
|
import org.goudham.me.exception.APIMapperException;
|
|
|
|
import org.goudham.me.exception.APIResponseException;
|
|
|
|
import org.goudham.me.exception.APIResponseException;
|
|
|
@ -95,6 +96,11 @@ public class APIWrapper {
|
|
|
|
return apiMapper.deserialize(waifuResult, Waifu.class);
|
|
|
|
return apiMapper.deserialize(waifuResult, Waifu.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Response<FilteredWaifu> getDailyWaifu() throws APIResponseException, APIMapperException {
|
|
|
|
|
|
|
|
Result waifuResult = sendRequest(httpClient, "meta/daily");
|
|
|
|
|
|
|
|
return apiMapper.deserialize(waifuResult, FilteredWaifu.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Response<Series> getSeries(String param) throws APIResponseException, APIMapperException {
|
|
|
|
Response<Series> getSeries(String param) throws APIResponseException, APIMapperException {
|
|
|
|
Result seriesResult = sendRequest(httpClient, "series/" + param);
|
|
|
|
Result seriesResult = sendRequest(httpClient, "series/" + param);
|
|
|
|
return apiMapper.deserialize(seriesResult, Series.class);
|
|
|
|
return apiMapper.deserialize(seriesResult, Series.class);
|
|
|
|