kalasjocke/hyp — pull request #4 by breerly (2014-07-30 02:38:36+00:00)
Title: Convenience API making Resonder's easier to use and test.

Updates Responder to have `build` and `dumps` method.

```python
PostResponder.build(posts) # returns a dictionary
PostResponder.dumps(posts) # returns a json string
```

This approach is popular in Ruby and creates a nicer API when instantiating the Responder is not desirable. For example, out `Faraday get` in this project: https://github.com/lostisland/faraday

This also makes testing easier as users of this api would only have to stub out this method call instead of creating a stub, stubbing __init__, then finally stubbing the method call.

You can still use the Responder the old way of course:

```python
PostResponder().respond(posts) # returns json
PostResponder().get(posts) # returns dictionary
```