Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Doc changes to how distance is returned in APi docs

  • Loading branch information...
commit 40661b2cd0ae1b9251b23ef9af921899b9a17d63 1 parent ae0f07f
Dave Rolsky autarch authored
Showing with 25 additions and 8 deletions.
  1. +1 −1  lib/VegGuide.pm
  2. +24 −7 share/mason/site/api-docs
2  lib/VegGuide.pm
View
@@ -5,7 +5,7 @@ use warnings;
our $VERSION = '0.01';
-our $REST_VERSION = '0.0.2';
+our $REST_VERSION = '0.0.3';
use Catalyst;
use DateTime;
31 share/mason/site/api-docs
View
@@ -276,11 +276,12 @@ unless ($toc) {
</tr>
<tr>
<td>distance</td>
- <td>string</td>
+ <td>floating point number</td>
<td>
The entry's distance from a search location. This is only present when
- searching for entries near a specific location. The string will
- include a number and units, something like "1.3 miles".
+ searching for entries near a specific location. There may be many
+ digits after the decimal point, so client libraries should round this
+ value as needed for display.
</td>
<td>
This is always present for entries in geographical search results,
@@ -1013,10 +1014,11 @@ unless ($toc) {
</p>
<pre><code>{
- "uri": "http://...",
- "entry_count": 123,
- "entries": [ ... ],
- "region": { ... }
+ "uri": "http://...",
+ "entry_count": 123,
+ "distance_unit": "mile",
+ "entries": [ ... ],
+ "region": { ... }
}</code></pre>
<p>
@@ -1028,6 +1030,10 @@ unless ($toc) {
</p>
<p>
+ The <em>distance_unit</em> key is always "mile" or "km".
+</p>
+
+<p>
If you search by address and the address does not resolve to a latitude and
longitude, we return a <a href="#Not-Found">404 Not Found</a> response.
</p>
@@ -1143,6 +1149,17 @@ unless ($toc) {
<h2>Release History</h2>
+<h3>0.0.3 - October 14, 2012</h3>
+
+<ul>
+ <li>
+ The Entry structures for geographical now return the distance as an
+ unrounded floating point number. The search response itself now includes
+ a <em>distance_unit</em> key ("mile" or "km"). Client libraries should
+ round the distance as needed for display.
+ </li>
+</ul>
+
<h3>0.0.2 - October 6, 2012</h3>
<ul>
Please sign in to comment.
Something went wrong with that request. Please try again.