-
Notifications
You must be signed in to change notification settings - Fork 11
Proxy
Matthew Taylor edited this page Dec 10, 2015
·
3 revisions
Returns projects and studios for the following homepage rows:
- Featured projects
- Featured studio
- Recently shared projects
- What the community is loving
- What the community is remixing
https://api.scratch.mit.edu/proxy/featured
curl -X GET "https://api.scratch.mit.edu/proxy/featured"
{
"community_featured_projects": [
{
"creator": "pgpg",
"id": 78798044,
"love_count": 332,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/7879/8044.png",
"title": "ice basketball",
"type": "project"
}
],
"community_featured_studios": [
{
"id": 1672166,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/galleries/thumbnails/167/2166.png",
"title": "We Bare Bears Studio",
"type": "gallery"
}
],
"community_most_loved_projects": [
{
"creator": "RRReol",
"id": 89273576,
"love_count": 191,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/8927/3576.png",
"title": "Kano",
"type": "project"
}
],
"community_most_remixed_projects": [
{
"creator": "2sad4me",
"id": 82025746,
"love_count": 2591,
"remixers_count": 176,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/8202/5746.png",
"title": "PlatformerAdventure",
"type": "project"
}
],
"community_newest_projects": [
{
"creator": "Auburntea5",
"id": 90514873,
"love_count": 0,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/9051/4873.png",
"title": "Christmas CC - ENTRY",
"type": "project"
}
]
}
Returns projects for the following user-specific homepage rows, if they exist for the user:
- Projects by Scratchers I am following
- Projects loved by Scratchers I am following
- Projects in studios I am following
- :id – the user's unique id.
https://api.scratch.mit.edu/proxy/users/:id/featured
curl -X GET "https://api.scratch.mit.edu/proxy/users/167/featured"
{
"community_featured_projects": [
{
"creator": "pgpg",
"id": 78798044,
"love_count": 332,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/7879/8044.png",
"title": "ice basketball",
"type": "project"
}
],
"community_featured_studios": [
{
"id": 1672166,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/galleries/thumbnails/167/2166.png",
"title": "We Bare Bears Studio",
"type": "gallery"
}
],
"community_most_loved_projects": [
{
"creator": "RRReol",
"id": 89273576,
"love_count": 191,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/8927/3576.png",
"title": "Kano",
"type": "project"
}
],
"community_most_remixed_projects": [
{
"creator": "2sad4me",
"id": 82025746,
"love_count": 2591,
"remixers_count": 176,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/8202/5746.png",
"title": "PlatformerAdventure",
"type": "project"
}
],
"community_newest_projects": [
{
"creator": "Auburntea5",
"id": 90514873,
"love_count": 0,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/projects/thumbnails/9051/4873.png",
"title": "Christmas CC - ENTRY",
"type": "project"
}
]
}
Returns the recent social activity for whomever the user specified in :username
is following (i.e the "What's Happening" box on the homepage)
- :username – The username of the user for whom to get activity
https://api.scratch.mit.edu/proxy/users/:username/activity
https://api.scratch.mit.edu/proxy/users/:username/activity?limit=5
curl -X GET "https://api.scratch.mit.edu/proxy/users/mres/activity?limit=3"
[
{
"actor": {
"admin": false,
"pk": 2480703,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/users/avatars/248/0703.png",
"username": "CrazyNimbus"
},
"datetime_created": "2015-12-10T13:47:15",
"extra_data": {
"project_title": "Bearstack Coding BETA"
},
"message": "\nloved\n <a href=\"/projects/90685890/\">Bearstack Coding BETA</a>",
"obj_id": 90685890,
"pk": 201983576,
"type": 2
},
{
"actor": {
"admin": false,
"pk": 676422,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/users/avatars/67/6422.png",
"username": "getbent"
},
"datetime_created": "2015-12-10T13:34:00",
"extra_data": {
"project_title": "3D Game Test"
},
"message": "\nloved\n <a href=\"/projects/89530941/\">3D Game Test</a>",
"obj_id": 89530941,
"pk": 201981315,
"type": 2
},
{
"actor": {
"admin": false,
"pk": 676422,
"thumbnail_url": "//cdn.scratch.mit.edu/static/site/users/avatars/67/6422.png",
"username": "getbent"
},
"datetime_created": "2015-12-10T13:34:00",
"extra_data": {
"project_title": "3D Game Test"
},
"message": "\nfavorited\n <a href=\"/projects/89530941/\">3D Game Test</a>",
"obj_id": 89530941,
"pk": 201981314,
"type": 3
}
]
Returns the number of unread messages for a given user.
- :username – The username of the user for whom to get the count
https://api.scratch.mit.edu/proxy/users/:username/activity/count
curl -X GET "https://api.scratch.mit.edu/proxy/users/mres/activity/count"
{
"msg_count": 0
}