The returned JSON of "findAllCountries" API method has null values for the lat and lon fields of some Countries (mostly sea bound entities).
I would expect that each Country would have a non-null value for these fields.
Is there a reason why some Country representations don't have lat/lon float values?
At the very least, I would expect lat/lon fields to have non-meaningfull values e.g.
"lat":-90.0,"lon"-180 or maybe "lat":0.0,"lon":0.0
Likewise, I would also think that the lat and lon fields of the Country representation might be better specified as being of type latitude and longitude and not of type float.
Per the documentation for the Country representation lat and lon field are of type float:
lat public none float The country's latitude.
lon public none float The country's longitude.
http://www.etsy.com/developers/documentation/reference/countryThe documentation for float (as parameter type) says:
float A number with or without a decimal point. Represented in output as a string, to avoid precision errors.
http://www.etsy.com/developers/documentation/getting_started/api_basics#section_parameter_typesWhat it does not say is that a float may be null (the empty string).
If this is not the case please provide documentation to that end.
All else being equal, the documentation for the latitude and longitude parameter
types is more explicit about the permissible format that a floaty
latitudinal/longitudinal thing must take:
latitude A valid numeric latitude, between -90.0 and 90.0
longitude A valid numeric longitude, between -180.0 and 180.0
http://www.etsy.com/developers/documentation/getting_started/api_basics#section_parameter_typesWhile it does not seem unreasonable to get a 400 response when I use the null valued lat and lon fields for a Country representation pulled from a previous request the following "findAllListingActive" request returns as follows:
GET
http://openapi.etsy.com/v2/listings/active?api_key=<API-KEY>&lon=&lat=
=> 400 Bad Request "Expected float value for 'lat'."
It does seem unreasonable to return Category representations having lat and lon
field values which can not be consistently relied upon as includes when making
"findAllListingActive" requests.
Following are the Country representations with null lat and lon fields as
returned by "findAllCountry" API method on 2012-07-25:
"American Samoa"
"Andorra"
"Anguilla"
"Antigua and Barbuda"
"Aruba"
"Bahamas"
"Bahrain"
"Barbados"
"Bouvet Island"
"British Indian Ocean Territory"
"British Virgin Islands"
"Cayman Islands"
"Christmas Island"
"Cocos (Keeling) Islands"
"Comoros"
"Cook Islands"
"Dominica"
"Falkland Islands (Malvinas)"
"Faroe Islands"
"Fiji"
"French Polynesia"
"French Southern Territories"
"Gibraltar"
"Grenada"
"Guadeloupe"
"Guam"
"Heard Island and McDonald Islands"
"Holy See (Vatican City State)"
"Isle of Man"
"Kiribati"
"Kosovo"
"Liechtenstein"
"Macao"
"Maldives"
"Malta"
"Marshall Islands"
"Martinique"
"Mauritius"
"Mayotte"
"Micronesia, Federated States of"
"Monaco"
"Montserrat"
"Nauru"
"Netherlands Antilles"
"New Caledonia"
"Niue"
"Norfolk Island"
"Northern Mariana Islands"
"Palau"
"Palestinian Territory, Occupied"
"Saint Helena"
"Saint Kitts and Nevis"
"Saint Lucia"
"Saint Martin (French part)"
"Saint Pierre and Miquelon"
"Saint Vincent and the Grenadines"
"Samoa"
"San Marino"
"Sao Tome and Principe"
"Seychelles"
"Solomon Islands"
"South Georgia and the South Sandwich Islands"
"Svalbard and Jan Mayen"
"Timor-Leste"
"Tokelau"
"Tonga"
"Turks and Caicos Islands"
"Tuvalu"
"United States Minor Outlying Islands"
"U.S. Virgin Islands"