5 ms·
Hi. Irrelevant with this thread, but can you please reply to me here if you got the time: https://news.ycombinator.com/item?id=35955336 https://news.ycombinator
by damethos 3y ago
Hi. Irrelevant with this thread, but can you please reply to me here if you got the time: https://news.ycombinator.com/item?id=35955336 https://news.ycombinator.com/item?id=35955336
Search for my username and you will find my question! Thanks!
- putnambr 3y agoSure - the *Client would be a class or library intended for import/use by consumers of a resource exposed by a service. The exposed API should be viewed as usable independently, but it can sometimes be useful to add a layer of abstraction via a Client to would hold any logic required for interacting with a specific API. Say you have an API that lets you bulk fetch an Item (`getItems(Collection<UUID> itemIds, int pageNumber, int pageSize)`), but the API enforces pagination and also requires authentication. A Client could require instantiation with whatever is required for authentication (`ic = new ItemClient(authToken)`), and provide a method to retrieve a huge list of Items without worrying about pagination (`ic.getItems(itemIds)`).
- damethos 3y agoThanks for the clarification. I thought you were talking about something else in the original comment.