I'd like to see what it would take to add support for the version 3 API while retaining backward compatibility (e.g. defaulting to version 2). If support were added, how do you see the user specifying which version to use? There are three reasonable (I think) approaches that I could come up with.
Option 1 - API version is derived from the methods themselves:
# Uses version 2
Surveymonkey.get_survey_list
# Users version 3
Surveymonkey.get_surveys
Option 2 - Use existing methods where applicable, and specify v3 using an additional option:
# Same call is used for both API versions
Surveymonkey.get_survey_list('version' => 3)
Option 3 - Use existing methods where applicable, and specify v3 by calling a scoped method before making API requests
# Specify API version
Surveymonkey::api_version(3)
# Will use version 3 API
Surveymonkey.get_survey_list
I'd love to hear some feedback - did you already have a plan for this?
I'd like to see what it would take to add support for the version 3 API while retaining backward compatibility (e.g. defaulting to version 2). If support were added, how do you see the user specifying which version to use? There are three reasonable (I think) approaches that I could come up with.
Option 1 - API version is derived from the methods themselves:
Option 2 - Use existing methods where applicable, and specify v3 using an additional option:
Option 3 - Use existing methods where applicable, and specify v3 by calling a scoped method before making API requests
I'd love to hear some feedback - did you already have a plan for this?