You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I rewrote the REST services to be injected through Dagger 2.
I added NetworkModule.java, (interface)Repository.java , GiphyService.java and removed ServiceUtil.java
Repository is injected so now
//MainFragment, Field Injection @Inject Repository mRepository
...
...
...
GiphyService implements repository and the lower abstraction methods are now private
//Constructor injection @Inject
public GiphyService(String accessToken, GiphyApiService service){...} @OverRide
public Observable getTrendingResults(){
return getTrendingResults(mAccessToken);
// and lower abstractions such as limits, searches etc.
}
However I did not rewrite the GiphyServiceTest since I'm not yet totally sure how to do it with Dagger, but I'm working on learning it. If you know how to do it feel free to fix it
In the meantime you can check my fork here if you want
No description provided.
The text was updated successfully, but these errors were encountered: