a few updates

- gitignore
- psr2
- extract curl execution to method
- use proper http codes
- remove unnecessary try/catch on json_decode