guardian/frontend — pull request #1717 by janua (2013-09-25 09:41:52+00:00)
Title: Fix .json and trails.json endpoints on facia

This fixes both the

.json and

/trails.json endpoints in facia, and adds back in the `trails` key that was used for swipe.

The `trails` key that is returned in the `.json` endpoint is now the items of the first collection in the list to define a `contentApiQuery`. I thought this would be more reasonable than searching explicitly for medium stories.

The `trails.json` endpoint returns the same HTML structure as fronts does, except it finds the first collection in the list that has items. @ironsidevsquincy Maybe this should instead do the same think as .json and take the first collection that has defined a contentApiQuery?

@stephanfowler