gboudreau/nest-api — pull request #25 by chawkinsuf (2014-02-27 22:27:45+00:00)
Title: Small improvements

Thanks for the api class! I am working on integrating this into a project and I have made a few changes that I think will improve the overall usability.

- I moved the username and password to member variables. If you try to use this class in a larger project, it makes much more sense to have the username and password passed to the constructor rather than rely on constants.
- I made the class name reference in getUserLocations dynamic. It's common to have to rename or add a namespace to a class when integrating into a larger project. Having that reference dynamic means only the name of the class needs to be updated.
- I broke out the weather call to its own function. I wanted to be able to get weather updates without pull all the location info again. The function is reused when pulling the location info. I also added the humidity to the weather result.