image v0 1
OPENi Activities: (GET, PUT)
- Get all images for given user
- Get all images for given user, for a specific service
- Get all images for given user, for a specific service, for a specific album
1. Methods
Get all objects for given user:
API_PATH/{USER_ID}/photos
Get access for specific object:
API_PATH/{OBJECT_ID}
Delete resource:
API_PATH/{OBJECT_ID}
Post resource:
API_PATH/{ALBUM_ID}
default: API_PATH/{USER_ID}
Update resource
API_PATH/{OBJECT_ID}
2. Connections
Name | Path | Description | Permissions |
---|---|---|---|
[comment] | API_PATH/{OBJECT_ID}/comments | ||
[like] | API_PATH/{OBJECT_ID}/likes | ||
[dislike] | API_PATH/{OBJECT_ID}/dislikes | ||
[tag] | API_PATH/{OBJECT_ID}/tags |
Properties
Fields:
The Image object has the following fields.
//Facebook-Like
Name | Description | Permissions | Returns |
---|---|---|---|
id | The object ID | -- | string |
from | The profile (user or page) that posted this photo | object containing id and name fields | |
tags | The tagged users and their positions in this photo | array of objects, the x and y coordinates are percentages from the left and top edges of the photo, respectively | |
name | The user provided caption given to this photo - do not include advertising in this field | string | |
name_tags | An array containing an array of objects mentioned in the name field which contain the id, name, and type of each object as well as the offset and length which can be used to match it up with its corresponding string in the name field | array | |
icon | The icon for the source service | string representing a valid URL | |
picture | The thumbnail-sized source of the photo | string representing a valid URL | |
source | The source image of the photo - currently this can have a maximum width or height of 720px, increasing to 960px on 1st March 2012 | string representing a valid URL | |
height | The height of the photo in pixels | number | |
width | The width of the photo in pixels | number | |
images | The 4 different stored representations of the photo | array of objects, containing height, width, and source fields | |
link | A link to the image on the appropriate service | string representing a valid URL | |
place | Location associated with a Photo, if any | object containing id and name of Page associated with this location, and a location field containing geographic information such as latitude, longitude, country, and other fields (fields will vary based on geography and availability of information) | |
created_time | The time the photo was initially published | string containing ISO-8601 date-time | |
updated_time | The last time the photo or its caption was updated | string containing ISO-8601 date-time | |
position | The position of this photo in the album | number |
3. JSON example
{
"url": "http://example.org/album/my_fluffy_cat.jpg",
"objectType": "photo",
"id": "tag:example.org,2011:my_fluffy_cat",
"count":"2",
"items":[
{
"published": "2011-02-10T15:04:55Z",
"foo": "some extension property",
"generator": {
"url": "http://example.org/activities-app"
},
"provider": {
"url": "http://example.org/activity-stream"
},
"title": "Martin posted a new video to his album.",
"actor": {
"url": "http://example.org/martin",
"objectType": "person",
"id": "tag:example.org,2011:martin",
"foo2": "some other extension property",
"image": {
"url": "http://example.org/martin/image",
"width": 250,
"height": 250
},
"displayName": "Martin Smith"
},
"verb": "post",
"object" : {
"url": "http://example.org/album/my_fluffy_cat.jpg",
"objectType": "photo",
"id": "tag:example.org,2011:my_fluffy_cat",
"image": {
"url": "http://example.org/album/my_fluffy_cat_thumb.jpg",
"width": 250,
"height": 250
}
},
"target": {
"url": "http://example.org/album/",
"objectType": "photo-album",
"id": "tag:example.org,2011:abc123",
"displayName": "Martin's Photo Album",
"image": {
"url": "http://example.org/album/thumbnail.jpg",
"width": 250,
"height": 250
}
}
},
{
"published": "2011-02-10T15:04:55Z",
"foo": "some extension property",
"generator": {
"url": "http://example.org/activities-app"
},
"provider": {
"url": "http://example.org/activity-stream"
},
"title": "Martin posted a new video to his album.",
"actor": {
"url": "http://example.org/martin",
"objectType": "person",
"id": "tag:example.org,2011:martin",
"foo2": "some other extension property",
"image": {
"url": "http://example.org/martin/image",
"width": 250,
"height": 250
},
"displayName": "Martin Smith"
},
"verb": "post",
"object" : {
"url": "http://example.org/album/my_fluffy_cat.jpg",
"objectType": "photo",
"id": "tag:example.org,2011:my_fluffy_cat",
"image": {
"url": "http://example.org/album/my_fluffy_cat_thumb.jpg",
"width": 250,
"height": 250
}
},
"target": {
"url": "http://example.org/album/",
"objectType": "photo-album",
"id": "tag:example.org,2011:abc123",
"displayName": "Martin's Photo Album",
"image": {
"url": "http://example.org/album/thumbnail.jpg",
"width": 250,
"height": 250
}
}
}
]
}
Related
Wiki: tag
Wiki: dislike
Wiki: like
Wiki: comment