Pretty big change. Things now pass up errors that can be handled by the
caller. This brought about a lot of change. Errors attempt to be
descriptive of where they came from and notify user of the api what
potentailly caused the error. Also renamed go-halo5-api.go to a more
suitable name, http.go. This might change in the future if we implement
the http.Client interface
moved all metadata.go function calls into method calls for the Halo
struct. This will make it easier to encapsulate baseurl, apikey, blah
blah, and also makes the code a little bit more readable. Stats.go and
profile.go are to follow.
Still need to implement http.Client interface and look over the code in
go-halo5-api.go. Most likely needs to break out and be cleaned up
Lots of tests have been added to the main.go file. Several of the functions return structs now instead of json strings. I've added the initial structs for the remaining functions.
Fixed formatting in the main.go file, and updated the SpartanImage and EmblemImage functions to return the URL of the image rather than the byte code. All the other functions now return byte code which is cast to a string in the main.go file.
The secret API key is now imported from the environment instead of being hard coded into the package. The gamertag variable has been renamed to sampleGamertag.