Specifically, there is a JSON RPC API that I work with. The specification might change between the API’s versions, but I can always tell what version it is when I connect. I have about 30 wrappers methods that make use of the available JSON RPC methods.
Do you insert switch statements wherever you see changes in a way something should be called? Or write completely new methods to make it easier to manage, even if most of the API’s functions didn’t change and your code doesn’t have to change?
EDIT: I forgot to mention I want my code to work with multiple versions of this API, ie. I can’t just update my code to work with version 2.0 because I may want to use it on a different server that provides this service whose version is 1.8.
I would hide the external API behind your own internal interfaces, and then have implementations that deal with the external API’s specific versions.
In other words, add another layer between you and the external API.