Permalink
Browse files

Added new maps/coordinate API to Visualplatform

  • Loading branch information...
1 parent 58aa8a9 commit 0d0b4b8c32140e1fbd910450a267871cfb7093f6 @steffentchr steffentchr committed Aug 18, 2011
Showing with 147 additions and 0 deletions.
  1. +8 −0 index.md
  2. +75 −0 photo-coordinate-add.md
  3. +64 −0 photo-coordinate-delete.md
View
@@ -162,6 +162,14 @@ Methods for listing and managing comments.
* [/api/comment/delete](comment-delete): Delete an existing comment
* [/api/comment/list](comment-list): List or search for comments
+### Coordinates (or maps)
+
+Methods for managing and listing geographic coordanates and maps associates with photos or videos.
+
+* [/api/photo/coordinate/add](photo-coordinate-add): Add a new geographic coordinate to a photo or video.
+* [/api/photo/coordinate/delete](photo-coordinate-delete): Delete a geographic coordinate associated with a photo or video.
+* [/api/photo/coordinate/list](photo-coordinate-list): List coordiates associates with one or more photos or videos.
+
### Distributions
Methods for managing distribution points
View
@@ -0,0 +1,75 @@
+# API Method: /api/photo/coordinate/add
+# flags=comments
+
+Add a new geographic coordinate to a photo or video, usually in order to place it on a map. You can add multiple coordinates to any single photo or video object.
+
+Once a coordiate has been added, it's is listed in [/api/photo/list](photo-list).
+
+### Parameters
+
+<table class="pretty">
+ <tr><th>Parameter</th><th>Description</th></tr>
+ <tr>
+ <td>
+ <tt>photo_id (required)</tt>
+ </td>
+ <td>
+ The ID of the photo object to attach to a coordinates
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <tt>search_string</tt>
+ </td>
+ <td>
+ A search string for a coordinate to attach to the photo or video. Behind the scenes we're using <a href="http://code.google.com/apis/maps/">Google Maps API</a> to perform the lookup, and we will attach only the best match as a coordinate. If the search string doesn't yield any matches, a <tt>no_such_coodinate</tt> error is returned. If you wish for more flexibility in which coordinate is chosen, use <tt>latitude</tt> and <tt>longitude</tt> to specify the locations.
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <tt>latitude</tt>
+ </td>
+ <td>
+ A latitude to attach to the photo or video. This parameter must be used along with <tt>longitude</tt>.
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <tt>longitude</tt>
+ </td>
+ <td>
+ A longitude to attach to the photo or video. This parameter must be used along with <tt>latitude</tt>.
+ </td>
+ </tr>
+</table>
+
+### Permission level
+
+The minimum required [permission level](index#permission-level) is:
+
+ write
+
+
+### Example XML Response
+
+ <response status="ok" permission_level="write"
+ message="The coordinate was added"/>
+
+
+### Example JSON Response
+
+ {
+ "status": "ok",
+ "message":"The coordinate was added",
+ "permission_level":"write",
+ "cached":"0",
+ "photo":{},
+ "p": "1",
+ "size": "1",
+ "site": { ... },
+ "endpoint": "/api/photo/coordinate/add"
+ }
+
View
@@ -0,0 +1,64 @@
+# API Method: /api/photo/coordinate/delete
+# flags=comments
+
+Delete a geographic coordinate associated with a photo or video.
+
+### Parameters
+
+<table class="pretty">
+ <tr><th>Parameter</th><th>Description</th></tr>
+ <tr>
+ <td>
+ <tt>photo_id (required)</tt>
+ </td>
+ <td>
+ The ID of the video in which to delete a coordinate.
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <tt>latitude (required)</tt>
+ </td>
+ <td>
+ The latitude of the coordinate to be deleted.
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <tt>longitude (required)</tt>
+ </td>
+ <td>
+ The longitude of the coordinate to be deleted.
+ </td>
+ </tr>
+</table>
+
+### Permission level
+
+The minimum required [permission level](index#permission-level) is:
+
+ write
+
+
+### Example XML Response
+
+ <response status="ok" permission_level="write"
+ message="The coordinate was deleted" cached="0"/>
+
+
+### Example JSON Response
+
+ {
+ "status": "ok",
+ "message":"The coordinate was deleted",
+ "permission_level":"write",
+ "cached":"0",
+ "photo":{},
+ "p": "1",
+ "size": "1",
+ "site": { ... },
+ "endpoint": "/api/photo/coordinate/delete"
+ }
+

0 comments on commit 0d0b4b8

Please sign in to comment.