Created
May 27, 2010 11:26
-
-
Save tokumine/415702 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Countries will be returned in an array when doing a search or index | |
// Limited to 10 results per query/page | |
// /api2/countries -> All countries | |
// /api2/countries?page=2 -> Paginatable | |
// /api2/countries?q="Britain" (Or Great Britain) -> free text search | |
// /api2/countries?iso="GB" (searches ISO2 and ISO3) -> ISO specific search | |
// /api2/countries?lat=x&lng=y -> GIS search point data | |
// /api2/countries?blx=x&bly=y&trx=a&try=b -> GIS search BBOX | |
// /api2/countries?q="Great" | |
[ | |
{'id':345, | |
'name': 'Great Britain', | |
'other_names': ['Blighty', 'the motherland'], | |
'iso2': "GB", | |
'iso3': 'GBR', | |
'area_reported': {'land': 999, 'marine': 999, 'all': 999}, | |
'area_gis': {'land': 999, 'marine': 999, 'all': 999}, | |
'protected_areas_count': {'land': 999, 'marine': 999, 'all': 999}, | |
'area_protected': {'land': 999, 'marine': 999, 'all': 999}, | |
'iucn_count': ['Ia':34, 'Ib':33 ... ] | |
'designation_count': ['National Park':66, 'Quasi National Park':33 ... ] | |
'marine_geom': 'either WKT or geoJson polygon in here', | |
'land_geom': 'either WKT or geoJson polygon in here', | |
'all_geom': 'either WKT or geoJson polygon in here', | |
'last_updated_at': '2010-5-1 00:00:00', | |
}, | |
{'id':344, | |
'name': 'Great Simonland', | |
'other_names': ['simon', 'si', '日本'], | |
'iso2': "SI", | |
'iso3': 'SIM', | |
'area_reported': {'land': 999, 'marine': 999, 'all': 999}, | |
'area_gis': {'land': 999, 'marine': 999, 'all': 999}, | |
'protected_areas_count': {'land': 999, 'marine': 999, 'all': 999}, | |
'area_protected': {'land': 999, 'marine': 999, 'all': 999}, | |
'iucn_count': ['Ia':34, 'Ib':33 ... ] | |
'designation_count': ['National Park':66, 'Quasi National Park':33 ... ] | |
'marine_geom': 'either WKT or geoJson polygon in here', | |
'land_geom': 'either WKT or geoJson polygon in here', | |
'all_geom': 'either WKT or geoJson polygon in here', | |
'last_updated_at': '2010-5-1 00:00:00', | |
} | |
] | |
// /api2/countries/1 -> show | |
{'id':1, | |
'name': 'Japan ', | |
'other_names': ['Nihon', 'Nippon', '日本'], | |
'iso2': "GB", | |
'iso3': 'GBR', | |
'area_reported': {'land': 999, 'marine': 999, 'all': 999}, | |
'area_gis': {'land': 999, 'marine': 999, 'all': 999}, | |
'protected_areas_count': {'land': 999, 'marine': 999, 'all': 999}, | |
'area_protected': {'land': 999, 'marine': 999, 'all': 999}, | |
'iucn_count': ['Ia':34, 'Ib':33 ... ] | |
'designation_count': ['National Park':66, 'Quasi National Park':33 ... ] | |
'marine_geom': 'either WKT or geoJson polygon in here', | |
'land_geom': 'either WKT or geoJson polygon in here', | |
'all_geom': 'either WKT or geoJson polygon in here', | |
'last_updated_at': '2010-5-1 00:00:00', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment