Skip to content

Commit

Permalink
API updates
Browse files Browse the repository at this point in the history
  • Loading branch information
steffentchr committed Oct 21, 2011
1 parent 70baa2a commit c2fce7b
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 5 deletions.
5 changes: 3 additions & 2 deletions distribution-ios-push-notification.md
Expand Up @@ -89,13 +89,14 @@ The minimum required [permission level](index#permission-level) is:
### Example XML Response

<response status="ok" permission_level="super"
message="The push notification was successfully to all registered iOS devices" cached="0"/>
message="The push notification was successfully snet to all registered iOS devices"
cached="0"/>

### Example JSON Response

{
"status": "ok",
"message": "The push notification was successfully to all registered iOS devices",
"message": "The push notification was successfully snet to all registered iOS devices",
"permission_level":"super",
"cached":"0",
"photo":{},
Expand Down
9 changes: 6 additions & 3 deletions index.md
Expand Up @@ -207,12 +207,15 @@ Methods for creating and managing live event video streams.

Methods for uploading and managing videos and photos.

* [/api/photo/delete](photo-delete): Delete a photo or video
* [/api/photo/delete](photo-delete): Delete a photo or video.
* [/api/photo/frame](photo-frame): Extract a single frame of a video clip as a JPEG image.
* [/api/photo/get-upload-token](photo-get-upload-token): Get a token for browser-based and non-authenticated uploading.
* [/api/photo/list](photo-list): List and search through photos and videos
* [/api/photo/list](photo-list): List and search through photos and videos.
* [/api/photo/rate](photo-rate): Rate a photo or video.
* [/api/photo/redeem-upload-token](photo-redeem-upload-token): Upload a video or photo using an [upload token](photo-get-upload-token).
* [/api/photo/replace](photo-replace): Replace a photo, replace a video or update the thumbnail of a video.
* [/api/photo/update](photo-update): Update the meta data of a photo or video
* [/api/photo/update](photo-update): Update the meta data of a photo or video.
* [/api/photo/update-upload-token](photo-update-upload-token): Update a photo or video. which has previously been or is in the process of being uploaded to the site.
* [/api/photo/upload](photo-upload): Upload a new photo or video.

### Players
Expand Down
53 changes: 53 additions & 0 deletions photo-rate.md
@@ -0,0 +1,53 @@
# API Method: /api/photo/rate
# flags=comments

Rate 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 to rate.
</td>
</tr>

<tr>
<td>
<tt>rating (required)</tt>
</td>
<td>
The rating normalized to a float value between 0 and 5. You will be in charge of converting the internal 0-1 value to match your site's rating scheme. For example, in a 5-star rating system, 0 stars will convert to a <tt>0</tt> rating, 1 star is <tt>0.25</tt> and so on up to 5 stars and <tt>1</tt>.
</td>
</tr>
</table>

### Permission level

The minimum required [permission level](index#permission-level) is:

anonymous


### Example XML Response

<response status="ok" permission_level="anonymous" cached="0">
<rating>0.5</rating>
</response>

### Example JSON Response

{
"status": "ok",
"permission_level":"anonymous",
"cached":"0",
"rating":{"rating": "0.5"},
"p": "1",
"size": "1",
"site": ...,
"endpoint": "/api/photo/rate"
}
15 changes: 15 additions & 0 deletions utility-geography.md
@@ -0,0 +1,15 @@
# API Method: /api/utility/geography
# flags=comments

Detect geopgraphical location from IP.

### Response

<response status="ok" permission_level="anonymous" cached="0">
<country_iso>DK</country_iso>
<region></region>
<city></city>
<lat></lat>
<long></long>
</response>

22 changes: 22 additions & 0 deletions utility-video-capabilties.md
@@ -0,0 +1,22 @@
# API Method: /api/utility/video-capabilties
# flags=comments

List mobile capabilities.

### Response

<response status="ok" permission_level="anonymous" cached="0">
<mobile_format>video_mobile_h263_aac</mobile_format>
<playback_3gpp>t</playback_3gpp>
<model_name>iPhone</model_name>
<playback_mp4_p>t</playback_mp4_p>
<brand_name>Apple</brand_name>
<playback_h263_amr_p>t</playback_h263_amr_p>
<playback_h263_p>t</playback_h263_p>
<playback_mpeg4_amr_p>t</playback_mpeg4_amr_p>
<playback_mpeg4_p>t</playback_mpeg4_p>
<device_id>apple_iphone_ver2_1</device_id>
<playback_h263_aac_p>t</playback_h263_aac_p>
<playback_amr_p>t</playback_amr_p>
<relative_distance>0.15277777777777777778</relative_distance>
</response>

0 comments on commit c2fce7b

Please sign in to comment.