-
Notifications
You must be signed in to change notification settings - Fork 10
Projects
Returns a list of projects shared by the user specified in username
https://api.scratch.mit.edu/users/:username/projects
- :username – the username of the user for whom you want to get the project list.
- limit – integer value representing the number of projects to limit the response to.
-
offset – integer value representing where in the list of the user's projects to start retrieving from. Projects are returned in order of when they were shared, so if
offset=5
, then the response will start with the 5th project shared by the user.
curl -X GET "https://api.scratch.mit.edu/users/mres/projects"
curl -X GET "https://api.scratch.mit.edu/users/mres/projects?limit=3&offset=20"
[
{
"description": "This is a remix of a project by MyRedNeptune. I simply cleaned up the scripts a little.\n\nINSTRUCTIONS:\nClick on reindeer and stars to make them play. Click on the house and moon for a surprise.\n\nHOW I MADE THIS:\nThe stage broadcasts each note.",
"history": {
"created": "2009-07-25T19:30:19.000Z",
"modified": "2009-07-25T19:30:19.000Z",
"shared": "2009-07-25T19:30:19.000Z"
},
"id": 622848,
"instructions": "",
"stats": {
"comments": 10,
"favorites": 7,
"loves": 3,
"views": 349
},
"title": "Remix of MyRedNeptune's project"
},
{
"description": "This project shows how to randomize the random number generator. The program continuously picks random numbers until the user presses the space bar.",
"history": {
"created": "2010-01-05T14:43:02.000Z",
"modified": "2010-01-05T14:43:02.000Z",
"shared": "2010-01-05T14:43:02.000Z"
},
"id": 831532,
"instructions": "",
"stats": {
"comments": 3,
"favorites": 1,
"loves": 1,
"views": 237
},
"title": "randomize"
},
{
"description": "Wrapup project for Scratch Guided Tour",
"history": {
"created": "2010-02-17T09:34:20.000Z",
"modified": "2010-02-17T09:34:20.000Z",
"shared": "2010-02-17T09:34:20.000Z"
},
"id": 892090,
"instructions": "",
"stats": {
"comments": 4,
"favorites": 5,
"loves": 3,
"views": 404
},
"title": "guided-tour-wrapup"
}
]
Returns the project by the username and unique project id specified.
https://api.scratch.mit.edu/users/:user/projects/:project
- :username – the username of the user for whom you want to get the project list.
- :project – the unique identifier of the project you want to retrieve
curl -X GET "https://api.scratch.mit.edu/users/mres/projects/10128125"
{
"description": "This is a radically simplified version of ericr's Bloom projects.\n",
"history": {
"created": "2013-05-04T15:53:43.000Z",
"modified": "2013-05-04T15:53:43.000Z",
"shared": "2013-05-04T15:54:56.000Z"
},
"id": 10128125,
"instructions": "Click anywhere on the stage",
"stats": {
"comments": 2,
"favorites": 2,
"loves": 2,
"views": 343
},
"title": "chimes"
}
Returns a list of projects that have been favorited by the user specified in :username
.
https://api.scratch.mit.edu/users/:username/favorites
- :username – the username of the user for whom you want to get the project list.
- limit – integer value representing the number of projects to limit the response to.
-
offset – integer value representing where in the list of the user's projects to start retrieving from. Projects are returned in order of when they were favorited, so if
offset=5
, then the response will start with the 5th project favorited by the user.
curl -X GET "https://api.scratch.mit.edu/users/mres/favorites"
curl -X GET "https://api.scratch.mit.edu/users/mres/favorites?limit=3offset=3"
[
{
"description": "My 10-year-old was asking how to have sprite detect when they collide. There are two parts to the answer.\r\rThe first part is to use the sensing block \"touching (other sprite)\", although you could also use \"distance to (other sprite)\"\r\rThe second part is when you want both sprites to detect the collision. The problem I encountered was that one sprite would detect the collision, turn and move away, before the other sprite sensed that they'd collided. This wouldn't be a problem in some circumstances, and I could have solved it by re-ordering when bouncing and moving happened, but instead I used the control block \"broadcast (message)\" to send a bounce message, then both sprites turn when they receive this message.\r\rA simple example that I hope helps someone.",
"history": {
"created": "2007-03-11T21:13:46.000Z",
"modified": "2007-03-11T21:13:46.000Z",
"shared": "2007-03-11T21:13:46.000Z"
},
"id": 291,
"instructions": "",
"stats": {
"comments": 24,
"favorites": 9,
"loves": 16,
"views": 7955
},
"title": "Collision detection example"
},
{
"description": "INSTRUCTIONS:\rUse the arrow keys to race your marble around the track to the finish line. If you slide off onto the grass, it will slow you down.\r\rWhat's your best lap time?\r\rHOW IT WORKS:\rThe marble has variables for its x and y velocities. The arrow keys make it accelerate by changing the velocities. The grass slows you down by multiplying the velocities by a fraction. \r\rTHINGS TO TRY: \rYou can make your own tracks by drawing a new background. Just use the same shade of green for the grass. Try making obstacles (even moving obstacles!) that you crash into, or enemies that chase you. You could make a little accelerator ramp that speeds you up, or a teleporter portal.",
"history": {
"created": "2007-03-17T14:31:31.000Z",
"modified": "2007-03-17T14:31:31.000Z",
"shared": "2007-03-17T14:31:31.000Z"
},
"id": 542,
"instructions": "",
"stats": {
"comments": 98,
"favorites": 21,
"loves": 22,
"views": 926
},
"title": "Marble Racer"
},
{
"description": "Thanks to everyone for making LLK the coolest group at the Media Lab!",
"history": {
"created": "2007-03-27T15:29:58.000Z",
"modified": "2007-03-27T15:29:58.000Z",
"shared": "2007-03-27T15:29:58.000Z"
},
"id": 849,
"instructions": "",
"stats": {
"comments": 48,
"favorites": 6,
"loves": 12,
"views": 271
},
"title": "Thanks LLK"
}
]
Returns the total number of projects shared on the site.
https://api.scratch.mit.edu/projects/count/all
curl -X GET "https://api.scratch.mit.edu/projects/count/all"
{
"count": 11893951
}
Returns projects that have been shared by users that the user with the given username is following.
- This endpoint requires authentication. A user is only able to see results for their own username.
https://api.scratch.mit.edu/users/:username/following/users/projects
- :username – the username of the user for whom you want to get the project list.
curl -X GET "https://api.scratch.mit.edu/users/mres/following/users/projects"
[
{
"id": 1657130,
"title": "Random Motion",
"description": "",
"instructions": "",
"author": {
"id": 1494,
"username": "chrisg"
},
"image": "https://uploads.scratch.mit.edu/projects/thumbnails/1657130.png",
"history": {
"created": "2011-03-14T22:06:50.000Z",
"modified": "2011-03-14T22:06:50.000Z",
"shared": "2011-03-14T22:06:50.000Z"
},
"stats": {
"views": 938,
"loves": 5,
"favorites": 5,
"comments": 0
},
"remix": {
"root": null
}
},
{
"id": 10118726,
"title": "Save the Minifigs!",
"description": "This uses the new Video blocks - so your computer needs a webcam for this to work.",
"instructions": "Oh no! Lego Minifigs are falling from the sky! It's your job to bounce them back up to their castle in the clouds so they don't end up in the water. They can swim though so it's okay, really.\n\n",
"author": {
"id": 159,
"username": "ericr"
},
"image": "https://uploads.scratch.mit.edu/projects/thumbnails/10118726.png",
"history": {
"created": "2013-04-25T05:08:35.000Z",
"modified": "2015-09-01T23:31:02.000Z",
"shared": "2013-05-15T11:22:19.000Z"
},
"stats":{
"views":17529,
"loves":298,
"favorites":237,
"comments":0
},
"remix":{
"root":null
}
}
]
Returns projects that have been added to studios that the user with the given username is following.
- This endpoint requires authentication. A user is only able to see results for their own username.
https://api.scratch.mit.edu/users/:username/following/studios/projects
- :username – the username of the user for whom you want to get the project list.
curl -X GET "https://api.scratch.mit.edu/users/mres/following/studios/projects"
[
{
"id": 1657130,
"title": "Random Motion",
"description": "",
"instructions": "",
"author": {
"id": 1494,
"username": "chrisg"
},
"image": "https://uploads.scratch.mit.edu/projects/thumbnails/1657130.png",
"history": {
"created": "2011-03-14T22:06:50.000Z",
"modified": "2011-03-14T22:06:50.000Z",
"shared": "2011-03-14T22:06:50.000Z"
},
"stats": {
"views": 938,
"loves": 5,
"favorites": 5,
"comments": 0
},
"remix": {
"root": null
}
},
{
"id": 10118726,
"title": "Save the Minifigs!",
"description": "This uses the new Video blocks - so your computer needs a webcam for this to work.",
"instructions": "Oh no! Lego Minifigs are falling from the sky! It's your job to bounce them back up to their castle in the clouds so they don't end up in the water. They can swim though so it's okay, really.\n\n",
"author": {
"id": 159,
"username": "ericr"
},
"image": "https://uploads.scratch.mit.edu/projects/thumbnails/10118726.png",
"history": {
"created": "2013-04-25T05:08:35.000Z",
"modified": "2015-09-01T23:31:02.000Z",
"shared": "2013-05-15T11:22:19.000Z"
},
"stats":{
"views":17529,
"loves":298,
"favorites":237,
"comments":0
},
"remix":{
"root":null
}
}
]
Returns projects that have been loved by users that the user with the given username is following.
- This endpoint requires authentication. A user is only able to see results for their own username.
https://api.scratch.mit.edu/users/:username/following/users/loves
- :username – the username of the user for whom you want to get the project list.
curl -X GET "https://api.scratch.mit.edu/users/mres/following/users/loves"
[
{
"id": 1657130,
"title": "Random Motion",
"description": "",
"instructions": "",
"author": {
"id": 1494,
"username": "chrisg"
},
"image": "https://uploads.scratch.mit.edu/projects/thumbnails/1657130.png",
"history": {
"created": "2011-03-14T22:06:50.000Z",
"modified": "2011-03-14T22:06:50.000Z",
"shared": "2011-03-14T22:06:50.000Z"
},
"stats": {
"views": 938,
"loves": 5,
"favorites": 5,
"comments": 0
},
"remix": {
"root": null
}
},
{
"id": 10118726,
"title": "Save the Minifigs!",
"description": "This uses the new Video blocks - so your computer needs a webcam for this to work.",
"instructions": "Oh no! Lego Minifigs are falling from the sky! It's your job to bounce them back up to their castle in the clouds so they don't end up in the water. They can swim though so it's okay, really.\n\n",
"author": {
"id": 159,
"username": "ericr"
},
"image": "https://uploads.scratch.mit.edu/projects/thumbnails/10118726.png",
"history": {
"created": "2013-04-25T05:08:35.000Z",
"modified": "2015-09-01T23:31:02.000Z",
"shared": "2013-05-15T11:22:19.000Z"
},
"stats":{
"views":17529,
"loves":298,
"favorites":237,
"comments":0
},
"remix":{
"root":null
}
}
]