Open abraham opened 1 year ago
Is there a reason to have ModelsResponse<T>
instead of using ModelResponse<List<T>>
?
I don't think there was any particular reason to have two Response classes other than to have .singular
and .plural
getters but I don't think there isn't a reason not to have a single method where one of those is an alias of the other.
This looks good to me
I've got the implementation where it's now easy to upgrade endpoints to Responses. I'm going to integrate it into my app to validate the changes work well before finishing up the work.
Initial take on #55 with the
timeline
,status
, andsearch
endpoints updated.New
Response
class that contains instances ofResult
as a singleresult
or multipleresults
which each have amodel
orexception
.One upside of this is the new response objects can start surfacing rate limit details. One downside is the searchend point is considered having single model response and if any one of them failed to parse none of the other results would be available.
Fixes #55