Designing a Wrapper for an External API: Single Service vs. Multiple Services

Lets say I am creating a wrapper around an external API, does it make more sense to put everything into 1 service with nested objects or create a service per endpoint group? Or just personal preference?

So:
const api = yield* ApiService

api.users.get()
api.groups.get()
// vs
const groupsApi = yield* GroupsApiService
const usersApi = yield* UsersApiService

usersApi.get()
groupsApi.get()
Was this page helpful?