codeforamerica/ohana-pdf — pull request #4 by rebyn (2013-06-20 09:11:19+00:00)
Title: Converted to be an external library: API2PDF

Call:

```
API2PDF.export(
url: "http://ohanapi.herokuapp.com/api/organizations/51a9fd0628217f89770003ab",
h1: "Code for America: Human Services Finder",
h2: "name"
)
```

@anselmbradford: I'm going to make this a gem. Generally it saves an API JSON as PDF so that you can download directly upon calling or save the file to S3. One question though: is it intentional for the Ohana API to be wrapped into a "response" field?

![screen shot 2013-06-20 at 11 09 29 am](https://f.cloud.github.com/assets/1239947/680235/269dd7cc-d989-11e2-9131-6c787f161bae.png)

Personally I think it's better for all the fields to be exposed on first level, i.e: ``@fetch["name"]`` rather than ``@fetch["response"]["name"]`` as the way I do it now.

Let me know what you think.
Cheers,
Tu.