wri/gfw-api — pull request #23 by eightysteele (2013-12-05 03:27:42+00:00)
Title: Update /countries API

@matallo here we go dude. fix for #21 and #22. slight API change, tell me what you think.

Basically instead of `/countries/alerts` endpoint we're now going with `/countries`. Country models include all properties from `gfw2_countries` table with alerts for the past 12 months (default, but configurable using `interval` URL parameter... for example `interval=6 months`).

List all countries ordered alphabetically by country name:
http://wip.gfw-apis.appspot.com/countries

List all countries ordered reverse alphabetically by country name:
http://wip.gfw-apis.appspot.com/countries?order=desc

Get country for specified iso:
http://wip.gfw-apis.appspot.com/countries?iso=bra

Get country for specified iso with alerts for past 6 months:
http://wip.gfw-apis.appspot.com/countries?iso=bra&interval=6%20Months