Add support for retrieving the current airing anime

pull/7/head
Hammy 3 years ago
parent 092d43172a
commit dfa05022e7

@ -83,4 +83,9 @@ public class APIWrapper {
Result seriesResult = sendRequest(httpClient, "series/" + param);
return apiMapper.deserialize(seriesResult, Series.class);
}
Response<List<FilteredSeries>> getAiringAnime(HttpClient httpClient) throws APIResponseException, APIMapperException {
Result seriesResult = sendRequest(httpClient, "airing");
return apiMapper.deserializeToList(seriesResult, FilteredSeries.class);
}
}

@ -66,6 +66,10 @@ public class MyWaifuClient {
return APIWrapper.getSeries(httpClient, String.valueOf(id));
}
public Response<List<FilteredSeries>> getAiringAnime() throws APIMapperException, APIResponseException {
return APIWrapper.getAiringAnime(httpClient);
}
/**
* Sets an instance of HttpClient
*

Loading…
Cancel
Save