Added option for api version.

v1 is being deprecated in Dec. Just added an option to enable v2. Seems to be compatible but didn't have tests to run against.