Fix Individual API YML -> CSV/XML/HTML
No surprise here but I'm missing something crucial with the formatting for the xml, csv, and html parsers.
I used the brilliant Simple API model that @benbalter built successfully for the developer_hubs.yml project but my attempt to translate it with the individual_apis.yml project have failed.
@konklone, @benbalter - any thoughts?
For the thread's reference:
https://github.com/18F/API-All-the-X/blob/gh-pages/data/individual_apis.html http://18f.github.io/API-All-the-X/data/individual_apis.html
https://github.com/18F/API-All-the-X/blob/gh-pages/data/individual_apis.xml http://18f.github.io/API-All-the-X/data/individual_apis.xml
https://github.com/18F/API-All-the-X/blob/gh-pages/data/individual_apis.csv http://18f.github.io/API-All-the-X/data/individual_apis.csv
It looks like the parser isn't quite getting the structure right. But also, the approach I suggested, with a dynamic key that is the name of the agency, makes parsing more annoying than I'd anticipated.
The JSON that comes back, for each agency, is like:
{"White House": [{name: "API 1", url: "https://example.gov/api"}, ...]}
The JavaScript code will have to be more sophisticated than what's currently there in your HTML. I can walk you through it at some point in your developer console if you like -- it's probably faster than doing it here.
Took a few cracks at this but no luck yet. I tried the html variant you helped me with, Eric, but have failed to figure it out, I'm afraid.
@konklone - can you give it a second crack?
Poking this, it'd be great to have a CSV source for data.gov/developers/apis