Updating the lib/habit-rpg.js file to use the Habitica API v3
For this pull request I have updated the lib/habit-rpg.js file to use the Habitica API v3, therefore fixing the Bad Gateway 502 error (https://github.com/Kerrick/githabit/issues/1).
I have deployed this version at heroku. A sample use would be the following, as a webhook to a repository: http://githabitnickrfer.herokuapp.com/githabit?api=habiticaApi&user=habiticaUser
Please validate, thanks!
I agree @Kerrick, I will provide a fix for this tonight. Thanks for the feedback.
@Kerrick, I changed the code to use the nodejs 'util' module, in order to avoid the risk that was associated with my previous commit. Please validate, thanks!