Closed ondrae closed 10 years ago
Code for America's blog posts are being returned in a random order by the CfAPI. We should be returning from newest to oldest.
http://codeforamerica.org/api/organizations/Code-for-America/stories
{ "objects": [ { "api_url": "http://codeforamerica.org/api/stories/100", "id": 100, "link": "http://www.codeforamerica.org/blog/2014/08/04/giselle-sperber-why-im-coding-for-america/", ... "organization_name": "Code for America", "title": "Giselle Sperber \u2013 Why I\u2019m Coding for America", "type": "blog" }, { "api_url": "http://codeforamerica.org/api/stories/495", "id": 495, "link": "http://www.codeforamerica.org/blog/2014/10/01/guest-post-from-omidyar-network-small-victories-lead-to-big-impact/", ... "organization_name": "Code for America", "title": "Guest Post from Omidyar Network | Small Victories Lead to Big Impact", "type": "blog" }, { "api_url": "http://codeforamerica.org/api/stories/329", "id": 329, "link": "http://www.codeforamerica.org/blog/2014/09/15/govtech-fund-launch/", ... "organization_name": "Code for America", "title": "Why the Govtech Fund is a Really Big Deal", "type": "blog" },
Add an ORDER BY filter to stories query https://github.com/codeforamerica/cfapi/blob/master/app.py#L667
ORDER BY
Description
Code for America's blog posts are being returned in a random order by the CfAPI. We should be returning from newest to oldest.
Example
http://codeforamerica.org/api/organizations/Code-for-America/stories