pwr22 / cloudflare-client

CloudFlare::Client Perl module
https://metacpan.org/pod/CloudFlare::Client
2 stars 0 forks source link

Handle API Versioning #4

Open pwr22 opened 7 years ago

pwr22 commented 7 years ago

Provide a way to specifying the API version wanted

mitchcapper commented 7 years ago

Why would you want to ever use an old API?

pwr22 commented 7 years ago

@mitchcapper I never would but I don't want to preclude the ability to use the next version

mitchcapper commented 7 years ago

Ah. I would suggest calling this "force_api_version" arg or something similar then, as there is a decent chance just changing to a future version number (of they deprecate the current one) would not just work. Just a name to make it a bit more obvious that things may not work as expected it changed.

pwr22 commented 7 years ago

My plan is to have a class per version

mitchcapper commented 7 years ago

@pwr22 Sounds good, although again if you write the class for V5 for example who would ever want to use V4? That is unless you change the perl interface itself so we are talking about your API migrations and they don't want to update their code before V4 is depreciated.

pwr22 commented 7 years ago

Since CloudFlare will only bump the version number again if they make backwards incompatible changes, I expect it would be necessary to make matching changes to the module interface

mitchcapper commented 6 years ago

Per #2 it seems the deadline for this is June 2nd 2018 now.