3rd party API calls in repository pattern
Usually, when writing a REST API, we should abstract responsibilities at least into these layers: Repository - general CRUD operations with data, (usually SQL, Redis) Service - domain business logic Delivery - http, grpc, websocket handlers If my data source is a 3rd party API, how much valid is it to put it into a repository layer? or is there any other better architectural approach for this? (For my particular instance, I am developing a REST API to automate things on that 3rd party platform, and obviously I would need to read and manipulate data through their REST API.)
Usually, when writing a REST API, we should abstract responsibilities at least into these layers:
Repository - general CRUD operations with data, (usually SQL, Redis)
Service - domain business logic
Delivery - http, grpc, websocket handlers
If my data source is a 3rd party API, how much valid is it to put it into a repository layer? or is there any other better architectural approach for this?
(For my particular instance, I am developing a REST API to automate things on that 3rd party platform, and obviously I would need to read and manipulate data through their REST API.)