Where to put REST API calls to Uncle Bob's Clean Architecture?

I am trying to use Uncle Bob's clean architecture in my Android app. So, I followed this guy with an excellent implementation based on RxAndroid, Dagger 2 for DI.
I know that to get data from data warehouses (Cloud or local db or disk), Interactors classes (Use Case at the domain level) will call repositories at the DATA level.

In my case, I have to make two parallel calls to the REST API (Foursquare API and Google API), then compare the received data from each call.
Do I have to implement these upgrades at the data level or within Interactors at the domain level?
If any external API call belongs to a data layer, what is the role of the interactions approach in Uncle Bob?

I am new to this approach, any help is much appreciated!

+4
source share
1 answer

I think you should call the API in the data layer and then process the result at the domain level, of course, if the result does not depend on any structure.

and interactions were those that organize the flow of data to and from the entity. ( http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/ )

+2
source

Source: https://habr.com/ru/post/1616464/


All Articles