Modify to use the v2 API
Merge pull request #125 from ijin/api-v2

v2.0 API support