En référence de Yahoo BOSS GEO Api:
http://yboss.yahooapis.com/geo/placefinder?location=170+South+Market+St.,+San+Jose,+CA
Faire une demande GET avec l'autorisation suivante HEADER
Exemple d'utilisation OAuth en-tête HTTP:
Autorisation: OAuth realm = "http://yboss.yahooapis.com/" , oauth_consumer_key = "dj0yJmk9QnFUYVRUSWtRZEhsJmQ9WVdrOVFrYzFja2x4TkdNbWNHbzlNVEExTWpFMk1ESTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD1lNA -", oauth_nonce = "ZDQDDVLFCWKCZ0BD", oauth_signature_method = "HMAC-SHA1", oauth_timestamp = » 1367827192" , oauth_version = "1.0", oauth_signature = "phP2dNiCmvwpK4M6G% 2F85KnnvTXo% 3D"
où:
L'authentification pour les requêtes BOSS Geo nécessite des informations OAuth dans l'en-tête HTTP OU via les paramètres de la requête GET. Il y a six éléments qui sont nécessaires à l'autorisation:
oauth_version=1.0 – The standard of OAuth supported by BOSS Geo.
oauth_timestamp= – The timestamp is expressed in the number of seconds since January 1, 1970 00:00:00 GMT. The timestamp value MUST be a positive integer and MUST be equal to or greater than the timestamp used in previous requests. The timestamp can be reused for up to 5 minutes. Important: After 5 minutes a fresh timestamp must be supplied.
oauth_nonce – is a random string, uniquely generated for all requests for a specific timestamp. This helps verify that a request has never been made before and helps prevent replay attacks when requests are made over a non-secure channel (such as HTTP).
oauth_consumer_key= – obtained from YDN during the BOSS project registration process. This is unique to the developer. Please follow the directions on the displayed key page and copy the entire key from YDN. If you do not copy the entire key, this results in a "Consumer Key rejected" error.
oauth_signature_method=HMAC-SHA1 – (specific algorithm used for BOSS OAuth calls).
oauth_signature – can be generated by an OAuth library. A list of supported OAuth libraries is available here: http://oauth.net/code. Over a dozen languages are supported.
Vous obtiendrez zip + 4 code en réponse sous clé « postalcode ».
Cette API est maintenant obsolète. Il a été remplacé par Placefinder. Maintenant, cela est remplacé par le service BOSS Geo.Ils disent "* Nous continuons à offrir une table YQL limitée pour Placefinder et Placemaker pour un usage non commercial.Les api gratuites de REST ne seront plus activement supportées. *" – nealmcb