dotcloud/docker — pull request #640 by fsouza (2013-05-19 03:15:15+00:00)
Title: api_client: added APIClient type, with the first function

I'm including ListContainers here, so we can discuss some of its design
and prepare for future methods. I'd like to get some feedback (on everything that's included in this pull request).

As you can see, I've created a type for options (I don't like the idea of providing four parameters to the method). This type provides the method ``queryString``, that contains a bunch of ifs. We can do some magic using the reflect package to automatically marshal struct types into query strings, or repeat this if approach in other requests that take too many parameters. Which option would you prefer?

Aside from the subject of this pull request: I'd like to rename ``ApiContainers`` and ``ApiImages`` types to the singular alternatives ``ApiContainer`` and ``ApiImage``. They don't represent a list of containers or images. What do you guys think?