-
Notifications
You must be signed in to change notification settings - Fork 10
Model
eyeem edited this page Feb 23, 2012
·
2 revisions
Below are the possible representation of users, albums, photos, comments, topics, news, and services. The objects and variables are hopefully self-explanatory, but we will describe those that might be not so clear.
For users, albums and photos, we will also provide the simplest valid object that the server might send back, as well as the possible dictionary names that would contain items of the respective objects.
{
"id": "1013",
"fullname": "Ramzi Rizk",
"nickname": "ramz",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/9c24eab725f8aa03b99c396dd4d45f2b9asdf3.jpg"
}
{
"user": {
"id": "1013",
"fullname": "ramz",
"nickname": "ramz",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/0a4a321f1806b00c668d111a314bd98a14985765.jpg",
"description": "EyeEm Ramz. EyeEm Happy! Srsly. Choo choo!!",
"photoUrl": "http://www.eyeem.com/thumb/sq/200/0a4a321f1806b00c668d111a314bd98a14985765.jpg",
"totalPhotos": 1040,
"totalFollowers": 283,
"totalFriends": 478,
"totalLikedAlbums": 58,
"email": "[email protected]",
"emailNotifications": true,
"pushNotifications": true,
"services": {
"facebook": {
"status": "active"
},
"twitter": {
"status": "active"
},
"foursquare": {
"status": "active"
},
"tumblr": {
"status": "active"
},
"flickr": {
"status": "inactive"
}
}
}
}
- Arrays of user items can have the following dictionary names as wrappers:
friends
,contributors
,followers
,likers
,users
- The fields
email
,emailNotifications
,pushNotifications
and theservices
dictionary are only available for the authenticated user object
{
"id": "17",
"name": "Berlin",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/5993d6f01a18a8fa6a3b13034ca1d8a1e7345edf-1321712288",
"updated": "2012-02-03T18:06:08+0000"
}
{
"album": {
"id": "17",
"name": "Berlin",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/5993d6f01a18a8fa6a3b13034ca1d8a1e7345edf-1321712288",
"updated": "2012-02-03T18:06:08+0000",
"type": "city",
"totalPhotos": "10432",
"totalLikers": 127,
"totalContributors": 814,
"photos": {
"items": [
{
"id": "216365",
"thumbUrl": "http://www.eyeem.com/thumb/h/100/3ca2b83032785f475476e77d20f2c41e230ec7f7-1328292321",
"photoUrl": "http://www.eyeem.com/thumb/640/480/3ca2b83032785f475476e77d20f2c41e230ec7f7-1328292321",
"width": 1024,
"height": 768,
"updated": "2012-02-03T18:06:08+0000",
"user": {
"id": "4463",
"fullname": "Fabian-Carlos Guhl",
"nickname": null,
"thumbUrl": "https://graph.facebook.com/536656083/picture?type=square"
},
"caption": "Discussing world peace at Oburger 69",
"totalLikes": 0,
"totalComments": 0,
"comments": {
"items": []
},
"likers": {
"items": []
}
},
{
"id": "216313",
"thumbUrl": "http://www.eyeem.com/thumb/h/100/1ac3d29659fc7bcf65882d66a676bef4acc1ad22-1328290328",
"photoUrl": "http://www.eyeem.com/thumb/640/480/1ac3d29659fc7bcf65882d66a676bef4acc1ad22-1328290328",
"width": 1224,
"height": 1632,
"updated": "2012-02-03T17:33:07+0000",
"user": {
"id": "60534",
"fullname": "666",
"nickname": null,
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/b9101e64f89be9c65bb6f4d9ee1dee66f4d43ad1.jpg"
},
"caption": "table at Marietta",
"totalLikes": 2,
"totalComments": 0,
"comments": {
"items": []
},
"likers": {
"items": [
{
"id": "11697",
"fullname": "steve",
"nickname": "psoneeleven",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/c08e8382817585604405e70813cf650ab20b7577.jpg"
}
]
}
}
]
},
"contributors": {
"offset": 0,
"limit": 3,
"total": 814,
"items": [
{
"id": "1025",
"fullname": "Moritz Otto",
"nickname": "moritzotto",
"thumbUrl": ""
},
{
"id": "1013",
"fullname": "ramz",
"nickname": "ramz",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/0a4a321f1806b00c668d111a314bd98a14985765.jpg"
},
{
"id": "1038",
"fullname": "Graf Heldenbrand",
"nickname": null,
"thumbUrl": ""
},
]
},
"likers": {
"offset": 0,
"limit": 4,
"total": 127,
"items": [
{
"id": "7801",
"fullname": "Sandro Günther",
"nickname": null,
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/ab999ad7e0ac73a7a01cdffcfd5f89b5ce853594.jpg"
},
{
"id": "59083",
"fullname": "Mathias",
"nickname": "mathias",
"thumbUrl": "https://graph.facebook.com/1087532650/picture?type=square"
},
{
"id": "58649",
"fullname": "Diiana Berlin",
"nickname": null,
"thumbUrl": "https://graph.facebook.com/100000343669388/picture?type=square"
},
{
"id": "11117",
"fullname": "Andreas Zeiser",
"nickname": null,
"thumbUrl": "https://graph.facebook.com/100000020995756/picture?type=square"
}
]
}
}
}
- Arrays of album items can have the following dictionary names as wrappers:
albums
,likedAlbums
,feedAlbums
- Albums can have the following type:
tag
,venue
,event
,city
,country
,live
,popular
,radius
,special
- The extended album object above is an example based on the following request:
https://www.eyeem.com/api/v2/albums/17?detailed=1&includePhotos=1&numPhotos=2&photoDetails=1&includeContributors=1&includeLikers=1
In such a request, the number of inline photos to return, whether to include the photo details (comments, likes, etc) is of course optional, typically, the photos, contributors and likers should be retrieved using additional calls to the respective endpoints. Such calls also offer the option to request more details (such as the other albums to which a photo belongs)
{
"id": "215058",
"thumbUrl": "http://www.eyeem.com/thumb/h/100/70b5d5feefc5946bb7b912b8661c3329912fda3d-1328177792",
"photoUrl": "http://www.eyeem.com/thumb/640/480/70b5d5feefc5946bb7b912b8661c3329912fda3d-1328177792",
"width": 1530,
"height": 2048,
"updated": "2012-02-02T10:16:33+0000"
}
{
"photo": {
"id": "215058",
"thumbUrl": "http://www.eyeem.com/thumb/h/100/70b5d5feefc5946bb7b912b8661c3329912fda3d-1328177792",
"photoUrl": "http://www.eyeem.com/thumb/640/480/70b5d5feefc5946bb7b912b8661c3329912fda3d-1328177792",
"width": 1530,
"height": 2048,
"updated": "2012-02-02T10:16:33+0000",
"user": {
"id": "1013",
"fullname": "ramz",
"nickname": "ramz",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/0a4a321f1806b00c668d111a314bd98a14985765.jpg"
},
"caption": "11:11 at Coffee to go",
"totalLikes": 12,
"totalComments": 2,
"comments": {
"items": [
{
"id": "36038",
"photoId": "215058",
"message": "i realized i was at the exact same place at the exact same moment on 11:11, had to do it :)",
"user": {
"id": "1013",
"fullname": "ramz",
"nickname": "ramz",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/0a4a321f1806b00c668d111a314bd98a14985765.jpg"
},
"updated": "2012-02-02T10:36:03+0000"
},
{
"id": "36036",
"photoId": "215058",
"message": "Simply brilliant!",
"user": {
"id": "1923",
"fullname": "Stephen Mohammed",
"nickname": "stephenmohammed",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/2e9fe28f92959b9b07ac4ad1cb91534c5ee657e6.jpg"
},
"updated": "2012-02-02T10:32:35+0000"
}
]
},
"likers": {
"items": [
{
"id": "4962",
"fullname": "Sarah Weinknecht",
"nickname": null,
"thumbUrl": "https://graph.facebook.com/583303009/picture?type=square"
}
]
},
"albums": {
"items": [
{
"id": "17",
"name": "Berlin",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/5993d6f01a18a8fa6a3b13034ca1d8a1e7345edf-1321712288",
"updated": "2012-02-03T18:06:08+0000",
"type": "city"
},
{
"id": "23",
"name": "Germany",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/17662e8dfa7d912c649220f29a85672024fa3d01-1321811964",
"updated": "2012-02-03T18:31:28+0000",
"type": "country"
},
{
"id": "10521",
"name": "Coffee to go",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/70b5d5feefc5946bb7b912b8661c3329912fda3d-1328177792",
"updated": "2012-02-02T10:16:33+0000",
"type": "venue"
},
{
"id": "55744",
"name": "11:11",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/86dce608a49b919c5ee07658e503f5c5d0d8d899-1321956886",
"updated": "2012-02-03T10:20:08+0000",
"type": "tag"
},
{
"id": "112649",
"name": "11:11 at Coffee to go",
"thumbUrl": "http://www.eyeem.com/thumb/sq/200/70b5d5feefc5946bb7b912b8661c3329912fda3d-1328177792",
"updated": "2012-02-02T10:16:38+0000",
"type": "event"
}
]
}
}
}
-
likers
is an array of users - Arrays of photo items can have the following dictionary names as wrappers:
photos
,friendsPhotos
,likedPhotos
{
"id": "36038",
"photoId": "215058",
"message": "i realized i was at the exact same place at the exact same moment on 11:11, had to do it :)",
"user": {
"id": "1013",
"fullname": "ramz",
"nickname": "ramz",
"thumbUrl": "http://www.eyeem.com/thumb/sq/50/0a4a321f1806b00c668d111a314bd98a14985765.jpg"
},
"updated": "2012-02-02T10:36:03+0000"
}
- Comment objects always include a basic user object identifying the comment's author
{
"name": "Waiting for the bell",
"totalPhotos": "4"
}
- Topics share the same ids as their respective albums.
{
"id": "19588",
"itemType": "photo",
"newsType": "like",
"photoId": "210930",
"albumId": "17",
"userId": "28072",
"message": "Matteo just liked one of your photos",
"thumbUrl": "https://graph.facebook.com/100001232077669/picture?type=square",
"updated": "2012-02-03T15:11:20+0000",
"seen": true
}
- itemType dictates what type of object the news item links to. Possible values:
photo
,user
,album
- newsType dictates what type of notification this is. Possible values:
like
,comment
,follow
,commentAfter
{
"services": {
"facebook": {
"status": "active"
},
"twitter": {
"status": "active"
},
"foursquare": {
"status": "active"
},
"tumblr": {
"status": "active"
},
"flickr": {
"status": "inactive"
}
}
}