google/go-github — pull request #56 by willnorris (2013-09-09 22:36:21+00:00)
Title: use go-querystring for constructing URLs

This demonstrates the use of go-querystring (which isn't actually published yet... I'm still waiting on an internal code review at Google) to construct request URLs. This also starts using `ListOptions` as an embedded struct inside our other `Options` structs that include pagination.

I ended up creating a new library rather than using uritemplates like I had originally mentioned in #50. A number of GitHub's API URLs have different bases depending on whether or not you are making a request on behalf of the authenticated user (e.g. `/user/repos` vs `/users/foo/repos`), which made using uritemplates a little awkward. Additionally, using uritemplates would still require changes in two places whenever a new parameter gets added... once in the Options struct, and once in the uri template string. Writing a custom library for this means we can drive everything from tags on the struct fields, which I really like.

@ktoso: see what you think, since you were previously working to clean up this code as well.