At some point most of us write a class that wraps an HTTP API. The constructor takes the things that do not change between calls: the base URL, the credentials, the timeout, a few defaults. The methods are the endpoints.
Source: [Dev.to](https://dev.to/mauvilsa/from-api-client-to-cli-without-writing-a-parser-3h01)