Update to api.php

- Hope it will be useful. I made these changes while trying to use this api in a standalone fashion. It looked like FastlyAPI::post was stuck  with only using POST, and not PURGE, but PURGE seems to be working fine. 
This method seems a lot cleaner than having a switch in the post method that causes it to use PURGE instead.