Aus Das deutschsprachige Scratch-Wiki

Tools.png Dieser Artikel soll in Kürze überarbeitet werden oder wird bereits überarbeitet.
Status:
ar55ist daran

Grund: Muss übersetzt werden und kategorien hinzufügen und wiki links anpassen



Die Scratch API ist eine Schnittstelle, aus der man verschiedene Informationen der Scratch Seite enziehen kann.

api.scratch.mit.edu Schnittstelle

Die Scratch API kann auch mit der folgenden URL benutzt werden:

https://api.scratch.mit.edu

GET /

Die Administratoren der API Schnittstelle bieten grundlegende Informationen zur API und zur Scratch-Website.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu

Beispielantwort von dem Server

{ "website":"scratch.mit.edu", "api":"api.scratch.mit.edu", "help":"help@scratch.mit.edu" }

Status des Servers (Health)

GET /health

Dies wird genutzt um den Status des Scratch-Servers abzurufen.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/health

Beispielantwort von dem Server

{ "version":"2d7d8b5e9c7a72cfe15a97ebcc5818ec7380374c", "uptime":11791451, "load":[ 0.0283203125, 0.03515625, 0.04541015625 ], "sql":{ "ssl":true, "started":"2016-03-03T20:54:19.798Z", "min":0, "max":20 } }

News

GET /news

Gibt Informationen zu dem Abschnitt "Scratch News" auf der Homepage zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/news

Beispielantwort von dem Server

[ { "id":140458468423, "stamp":"2016-03-04T19:08:01.000Z", "headline":"Scratch Video Update Ep. 14", "url":"https://scratch.mit.edu/discuss/topic/186558/", "image":"https://40.media.tumblr.com/b563e9425dfca8ac53396d997db312ba/tumblr_inline_nwua1f4Chy1szpavb_540.png", "copy":"Want to know what's happening on Scratch? Check out the latest video update!" }, { "id":140391071468, "stamp":"2016-03-03T15:13:27.000Z", "headline":"New Community Blog Post!", "url":"https://scratch.mit.edu/discuss/topic/186359/", "image":"https://36.media.tumblr.com/b8e8bc37f38a135a0f873a6fe7788701/tumblr_inline_nwuak8hOun1szpavb_540.png", "copy":"6 Dance Parties on Scratch To Join Right Now!" }, ... ]

Projekte

GET /projects/count/all

Gibt die Gesamtzahl der für andere freigegebenen Projekte auf der Scratch-Website zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/projects/count/all

Beiuspielantwort von dem Server

{ "count":13561186 }

Proxy

GET /proxy/featured

Gibt Informationen zu den aktuell auf der Startseite der Website angezeigten Projekten zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/proxy/featured

Beispielantwort von dem Server

{
    "community_newest_projects":[
        {
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/10157/8493.png",
            "title":"Take To The Sky- CC  ~OPEN~ remix",
            "creator":"Sapphire19",
            "type":"project",
            "id":101578493,
            "love_count":0
        },
        {
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/10157/8191.png",
            "title":"Untitled",
            "creator":"Sally_Williams-",
            "type":"project",
            "id":101578191,
            "love_count":0
        },
        ...
    ],
    "community_most_remixed_projects":[
        {
            "title":"Oreo!!!",
            "type":"project",
            "remixers_count":429,
            "love_count":11395,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/2625/7525.png",
            "creator":"FunnyAnimatorJimTV",
            "id":26257525
        },
        ...
    ],
    "scratch_design_studio":[
        {
            "gallery_id":1859165,
            "creator":"NaturalmotionStudios",
            "remixers_count":0,
            "gallery_title":"Remix-A-Thon",
            "love_count":8,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/9805/1641.png",
            "title":"My Dream House - SDS",
            "type":"project",
            "id":98051641
        },
        ...
    ],
    "curator_top_projects":[
        {
            "title":"Colour Dash! ",
            "creator":"enderbrick",
            "love_count":30,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/9647/1680.png",
            "curator_name":"Cirrus-",
            "type":"project",
            "id":96471680
        },
        ...
    ],
    "community_featured_studios":[
        {
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/galleries/thumbnails/139/9754.png",
            "type":"gallery",
            "id":1399754,
            "title":"Robots, Androids, and Artificial Intelligence"
        },
        ...
    ],
    "community_most_loved_projects":[
        {
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/10022/2418.png",
            "title":"Instrument Sprites",
            "creator":"ceebee",
            "type":"project",
            "id":100222418,
            "love_count":104
        },
        ...
    ],
    "community_featured_projects":[
        {
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/9486/8644.png",
            "title":"Cavern | Platformer",
            "creator":"Influenzi",
            "type":"project",
            "id":94868644,
            "love_count":334
        },
        ...
    ]
}

GET /proxy/users/<user_id>/featured

Gibt Informationen zu "Was passiert?" Abschnitt der Homepage für einen bestimmten Benutzer.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/proxy/users/167/featured

Beispielantwort von den Server

{  
    "custom_projects_by_following":[  
        {  
            "title":"Justify",
            "type":"project",
            "remixers_count":"0",
            "love_count":"17",
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/10012/2918.png",
            "creator":"NickyNouse",
            "id":"100122918"
        },
        {  
            "title":"Cosmic Narwhal ",
            "type":"project",
            "remixers_count":"0",
            "love_count":"10",
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/10090/1960.png",
            "creator":"petrichord",
            "id":"100901960"
        },
        ...
    ],
    "custom_projects_in_studios_following":[  
        {  
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/10098/9479.png",
            "title":"Life",
            "creator":"Shoujo-ai",
            "type":"project",
            "id":"100989479",
            "love_count":"22"
        },
        ...
    ],
    "custom_projects_loved_by_following":[  
        {  
            "creator":"Meap77",
            "remixers_count":"32",
            "love_count":"1099",
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/9530/1826.png",
            "title":"Can You Remember? (the game)",
            "type":"project",
            "id":"95301826"
        },
        ...
    ]
}

GET /proxy/users/<username>/activity

Gibt Informationen zum Abschnitt "Was ich getan habe" eines bestimmten Benutzerprofils zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/proxy/users/mres/activity

Beispielantwort von den Server

[  
    {  
        "obj_id":100736613,
        "datetime_created":"2016-03-14T12:09:49",
        "actor":{  
            "username":"ceebee",
            "pk":2755634,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/users/avatars/275/5634.png",
            "admin":true
        },
        "pk":227790976,
        "message":"\nfavorited\n   <a href=\"/projects/100736613/\">I'm A Cat AMV</a>",
        "extra_data":{  
            "project_title":"I'm A Cat AMV"
        },
        "type":3
    },
    {  
        "obj_id":100736613,
        "datetime_created":"2016-03-14T12:09:49",
        "actor":{  
            "username":"ceebee",
            "pk":2755634,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/users/avatars/275/5634.png",
            "admin":true
        },
        "pk":227790975,
        "message":"\nloved\n    <a href=\"/projects/100736613/\">I'm A Cat AMV</a>",
        "extra_data":{  
            "project_title":"I'm A Cat AMV"
        },
        "type":2
    },
    {  
        "obj_id":101537695,
        "datetime_created":"2016-03-14T07:13:36",
        "actor":{  
            "username":"ericr",
            "pk":159,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/users/avatars/0/0159.png",
            "admin":false
        },
        "pk":227767012,
        "message":"\nshared the project \n    <a href=\"/projects/101537695/\" data-tag=\"object\">a little band</a>",
        "extra_data":{  
            "project_title":"a little band"
        },
        "type":10
    },
    {  
        "obj_id":13182467,
        "datetime_created":"2016-03-14T04:33:18",
        "actor":{  
            "username":"ericr",
            "pk":159,
            "thumbnail_url":"//cdn.scratch.mit.edu/static/site/users/avatars/0/0159.png",
            "admin":false
        },
        "pk":227757062,
        "message":"\nis now following\n    <a href=\"/users/juanneco/\">juanneco</a>",
        "extra_data":{  
            "followee_username":"juanneco"
        },
        "type":0
    },
    ...
]

GET /proxy/users/<username>/activity/count

Dies gibt die Anzahl der ungelesenen Nachrichten eines Benutzers zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/proxy/users/mres/activity/count

Beispielantwort von den Server

{ "msg_count":12 }

Users

GET /users/<username>

Gibt Informationen zum angegebenen Benutzer zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres

Example Response

{ "id":167, "username":"mres", "history":{ "joined":"2007-03-07T03:50:14.000Z" }, "profile":{ "id":29, "images":{ "90x90":"https://cdn2.scratch.mit.edu/get_image/user/167_90x90.png?v=", "60x60":"https://cdn2.scratch.mit.edu/get_image/user/167_60x60.png?v=", "55x55":"https://cdn2.scratch.mit.edu/get_image/user/167_55x55.png?v=", "50x50":"https://cdn2.scratch.mit.edu/get_image/user/167_50x50.png?v=", "32x32":"https://cdn2.scratch.mit.edu/get_image/user/167_32x32.png?v=" }, "status":"I'm working on new technologies and activities to support the four P's of creative learning: Projects, Passion, Peers, and Play. \n\nKeep on Scratching! =^..^=", "bio":"I'm a professor at the MIT Media Lab. But more important: I'm a member of the Scratch Team! \n\nCheck out my TED talk about Scratch: http://bit.ly/mres-ted-talk", "country":"United States" } }

GET /users/<username>/favorites

Gibt eine Reihe von Details zu den Projekten zurück, die ein bestimmter Benutzer auf der Website favorisiert hat.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres/favorites

Beispielantwort von den Server

[
    {
        "id":291,
        "title":"Collision detection example",
        "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.",
        "instructions":"",
        "history":{
            "created":"2007-03-11T21:13:46.000Z",
            "modified":"2007-03-11T21:13:46.000Z",
            "shared":"2007-03-11T21:13:46.000Z"
        },
        "stats":{
            "views":8567,
            "loves":17,
            "favorites":10,
            "comments":24
        }
    },
    {
        "id":495,
        "title":"Digital Logic Toolkit",
        "description":"INSTRUCTIONS\rDrag out and connect your parts any way you want. Click the rotate button to turn parts.\r\rPARTS\rRed and blue power squares.\rLong wire and short wire with yellow inputs.\rAnd gate and Or gate with yellow inputs.\rTriangular inverter with yellow input.\r\rLEARN MORE\rhttp://jjackson.eng.ua.edu/courses/ece380/lectures/\r\rFUTURE DIRECTIONS\rWhat other toolkits could be built in Scratch?",
        "instructions":"",
        "history":{
            "created":"2007-03-16T03:45:07.000Z",
            "modified":"2007-03-16T03:45:07.000Z",
            "shared":"2007-03-16T03:45:07.000Z"
        },
        "stats":{
            "views":739,
            "loves":32,
            "favorites":25,
            "comments":15
        }
    },
    ...
]

GET /users/<username>/followers

Gibt eine Liste der neuesten Follower eines Benutzers zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres/followers

Beispielantwort von den Server

[ { "id":15833514, "username":"Dylan_Test", "history":{ "joined":"2016-03-15T12:27:56.000Z" }, "profile":{ "id":15833514, "avatar":"1583/3514.png", "status":"", "bio":"I just test things out here\nMy real account ", "country":"Antarctica" } }, { "id":4149226, "username":"ILoveGerbils25", "history":{ "joined":"2014-05-16T23:08:00.000Z" }, "profile":{ "id":4149226, "avatar":"414/9226.png", "status":"I am back\nAT:closed \n\nf4f: sure <33\ncollabs:closed\n\nrequests: closed", "bio":"Raven/She/13/\n\nHi I'm ILoveGerbils25 and I love Sonic, creepypasta, harry potter, pokemon, pusheen,and Splatoon.\nFlockmod:RavenFire66\nMood:Bouncing off the walls ", "country":"United States" } }, ... ]

GET /users/<username>/following

Gibt eine Liste der Benutzer zurück, denen der angegebene Benutzer zuletzt gefolgt ist.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres/following

Beispielantwort von den Server

[ { "id":1197797, "username":"bubble103", "history":{ "joined":"2012-02-16T06:26:12.000Z" }, "profile":{ "id":1197797, "avatar":"119/7797.png", "status":"✩-- Colour Divide ep2 - 100%\n✩-- Collab with @Driftwood14\n\nMy evil clone >> @bubbIe103", "bio":"Hi there! I'm a shy extrovert.\n------✩-★-✩------\nI love using programming to express myself and my ideas! Scratch is awesome!\n------✩-★-✩------\n", "country":"South Africa" } }, { "id":10707222, "username":"-MarzBarz-", "history":{ "joined":"2015-06-18T23:00:09.000Z" }, "profile":{ "id":10707222, "avatar":"1070/7222.png", "status":"Right now I'm kind of experimenting with my art style so everything's gonna look weird for a while\n*sigh*", "bio":"helloooooooo", "country":"United States" } }, ... ]

GET /users/<username>/messages/count

Dies gibt die Anzahl der ungelesenen Nachrichten eines Benutzers zurück.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres/messages/count

Beispielantwort von den Server

{ "count":12 }

GET /users/<username>/projects

Gibt ein Array mit Informationen zu den Projekten zurück, die ein bestimmter Benutzer auf der Scratch-Website freigegeben hat.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres/projects

Beispielantwort von dem Server

[
    {
        "id":142,
        "title":"PlayWithYourFace",
        "description":"INSTRUCTIONS \r\nClick the Green Flag. Move the mouse over the photos to play with different image effects. Click the Green Flag again to restart. \r\n\r\nHOW I MADE THIS \r\nIn some photos (like the top middle), the mouse position controls the amount of the image effect. In other photos (like the bottom middle), the mouse position controls the rate of change in the image effect. The first case uses the SET EFFECT block; the second cases uses the CHANGE EFFECT block. \r\n\r\nMORE IDEAS\r\nIn these examples, one image effect is applied to each photo. You might want to apply two (or more) image effects to the same photo. For example, make the x-position control one effect and make the y-position control another effect.",
        "instructions":"",
        "history":{
            "created":"2007-03-07T14:48:22.000Z",
            "modified":"2007-03-07T14:48:22.000Z",
            "shared":"2007-03-07T14:48:22.000Z"
        },
        "stats":{
            "views":669,
            "loves":19,
            "favorites":19,
            "comments":58
        }
    },
    {
        "id":864,
        "title":"OceanMusicBox",
        "description":"This project was inspired by Toshio Iwai, an innovative artist and software designer from Japan. \r\n\r\nINSTRUCTIONS \r\nClick the Green Flag to start. Move the starfish and urchins to change the tune. (You can also use the ones at the bottom of the screen.) Place starfish higher and lower on the screen to play different notes. Move urchins higher and lower on the screen to get different drum sounds. Try changing the SPEED and INSTRUMENT sliders",
        "instructions":"",
        "history":{
            "created":"2007-03-28T14:01:50.000Z",
            "modified":"2007-03-28T14:01:50.000Z",
            "shared":"2007-03-28T14:01:50.000Z"
        },
        "stats":{
            "views":239,
            "loves":21,
            "favorites":18,
            "comments":11
        }
    },
    ...
]

GET /users/<username>/projects/<project_id>

Gibt Informationen zurück, welche relevant zu dem Projekt sind.

Beispielanfrage an den Server

GET https://api.scratch.mit.edu/users/mres/projects/142

Beispielantwort von den Server

{ "id":142, "title":"PlayWithYourFace", "description":"INSTRUCTIONS \r\nClick the Green Flag. Move the mouse over the photos to play with different image effects. Click the Green Flag again to restart. \r\n\r\nHOW I MADE THIS \r\nIn some photos (like the top middle), the mouse position controls the amount of the image effect. In other photos (like the bottom middle), the mouse position controls the rate of change in the image effect. The first case uses the SET EFFECT block; the second cases uses the CHANGE EFFECT block. \r\n\r\nMORE IDEAS\r\nIn these examples, one image effect is applied to each photo. You might want to apply two (or more) image effects to the same photo. For example, make the x-position control one effect and make the y-position control another effect.", "instructions":"", "history":{ "created":"2007-03-07T14:48:22.000Z", "modified":"2007-03-07T14:48:22.000Z", "shared":"2007-03-07T14:48:22.000Z" }, "stats":{ "views":669, "loves":19, "favorites":19, "comments":58 } }

Site-API-Schnittstelle (veraltet)

Information icon.png Information:
Diese API ist  veraltet , was bedeutet, dass sie ersetzt wurde oder nicht mehr als sicher gilt. Verwenden Sie nach Möglichkeit die neuere Schnittstelle  api.

Die Site-API ist eine Legacy-Schnittstelle, die am 25. Oktober 2015 offiziell veraltet ist, wie vom Scratch Team-Mitglied thisandagain [1] angekündigt. (26.10.2015). Obwohl die Benutzeroberfläche veraltet ist, gibt es noch einige nützliche Funktionen. Auf diese API kann über die folgende URL zugegriffen werden.

https://scratch.mit.edu/site-api/

Comments

GET /comments/gallery/<studio_id>/

Gibt die Kommentare zu einem Studio in Form von rohem HTML zurück.

Beispielanfrage an den Server

GET https://scratch.mit.edu/site-api/comments/gallery/5342/

GET /comments/project/<project_id>/

Gibt die Kommentare zu einem Projekt in Form von rohem HTML zurück.

Beispielanfrage an den Server

GET https://scratch.mit.edu/site-api/comments/project/142/

GET /comments/user/<username>/

Gibt die Kommentare zu einem bestimmten Benutzerprofil in Form von normalem HTML zurück.

Beispielanfrage an den Server

GET https://scratch.mit.edu/site-api/comments/user/mres/

Users

PUT /users/followers/<username>/add/

Folgt einem Scratch Benutzer.

Beispielanfrage an den Server

PUT https://scratch.mit.edu/site-api/users/followers/mres/add/

Projekte

PUT /users/lovers/<project_id>/add/

Favorisiert ein Projekt.

Beispielanfrage an den Server

PUT https://scratch.mit.edu/site-api/users/lovers/104/add/

PUT /users/favoriters/<project_id>/add/

Beispielanfrage an den Server

PUT https://scratch.mit.edu/site-api/users/favoriters/104/add/

Request Headers

Dies sind Request Headers, die ausgefüllt werden können.

Host: User-Agent: Accept: Accept-Language: Accept-Encoding: Content-Type: X-CSRFToken: X-Requested-With: Referer: Content-Length: Cookie: Connection:

varserver Interface

Die varserver API kann verwendet werden, um die Werte von Cloud-Variablen in Projekten anzufordern. Auf diese API kann über die folgende URL zugegriffen werden.

https://scratch.mit.edu/varserver/

GET /<project_id>

Gibt Informationen zu den Cloud-Daten eines bestimmten Projekts zurück.

Beispielanfrage an den Server

GET https://scratch.mit.edu/varserver/10080213

Beispielantwort von den Server

{ "variables":[ { "name":"☁ Scratch Cat", "value":"2" }, { "name":"☁ Tera", "value":"6" }, { "name":"☁ Gobo", "value":"1" } ], "lists":[ ] }

api/v1 Interface (veraltet)

Die API v1-Schnittstelle ist eine Legacy-Schnittstelle, die ursprünglich während der Entwicklung von Scratch 2.0 erstellt wurde. Es kann über die folgende URL zugegriffen werden.

https://scratch.mit.edu/api/v1/

GET /

Das Stammverzeichnis der API v1-Schnittstelle enthält grundlegende Informationen zur API.

Beispielanfrage an den Server

GET https://scratch.mit.edu/api/v1/

Beispielantwort von den Server

{ "project":{ "list_endpoint":"/api/v1/project/", "schema":"/api/v1/project/schema/" }, "projecttag":{ "list_endpoint":"/api/v1/projecttag/", "schema":"/api/v1/projecttag/schema/" }, "tag":{ "list_endpoint":"/api/v1/tag/", "schema":"/api/v1/tag/schema/" }, "user":{ "list_endpoint":"/api/v1/user/", "schema":"/api/v1/user/schema/" } }

Projekte

GET /project/<project_id>/

Gibt Informationen zu einem Projekt und dessen Autor zurück.

Beispielanfrage an den Server

GET https://scratch.mit.edu/api/v1/project/142/

Beispielantwort von den Server

{ "creator":{ "username":"mres", "userprofile":{ "bio":"I'm a professor at the MIT Media Lab. But more important: I'm a member of the Scratch Team! \n\nCheck out my TED talk about Scratch: http://bit.ly/mres-ted-talk", "country":"United States", "status":"I'm working on new technologies and activities to support the four P's of creative learning: Projects, Peers, Passion, and Play" } }, "datetime_shared":"2007-03-07T14:48:22", "description":"INSTRUCTIONS \r\nClick the Green Flag. Move the mouse over the photos to play with different image effects. Click the Green Flag again to restart. \r\n\r\nHOW I MADE THIS \r\nIn some photos (like the top middle), the mouse position controls the amount of the image effect. In other photos (like the bottom middle), the mouse position controls the rate of change in the image effect. The first case uses the SET EFFECT block; the second cases uses the CHANGE EFFECT block. \r\n\r\nMORE IDEAS\r\nIn these examples, one image effect is applied to each photo. You might want to apply two (or more) image effects to the same photo. For example, make the x-position control one effect and make the y-position control another effect.", "favorite_count":"19", "id":142, "love_count":"19", "resource_uri":"/api/v1/project/142/", "thumbnail":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/0/0142.png", "title":"PlayWithYourFace", "view_count":"669" }

GET /project/set/<project_ids>/

Gibt Informationen zu einer Reihe von Projekten und deren Autoren zurück. Projekt-IDs werden mit einem Semikolon getrennt.

Beispielanfrage an den Server

GET https://scratch.mit.edu/api/v1/project/set/142;864/

Beispielantwort von den Server

{  
    "objects":[  
        {  
            "creator":{  
                "username":"mres",
                "userprofile":{  
                    "bio":"I'm a professor at the MIT Media Lab. But more important: I'm a member of the Scratch Team! \n\nCheck out my TED talk about Scratch: http://bit.ly/mres-ted-talk",
                    "country":"United States",
                    "status":"I'm working on new technologies and activities to support the four P's of creative learning: Projects, Peers, Passion, and Play"
                }
            },
            "datetime_shared":"2007-03-07T14:48:22",
            "description":"INSTRUCTIONS \r\nClick the Green Flag. Move the mouse over the photos to play with different image effects. Click the Green Flag again to restart. \r\n\r\nHOW I MADE THIS \r\nIn some photos (like the top middle), the mouse position controls the amount of the image effect. In other photos (like the bottom middle), the mouse position controls the rate of change in the image effect. The first case uses the SET EFFECT block; the second cases uses the CHANGE EFFECT block. \r\n\r\nMORE IDEAS\r\nIn these examples, one image effect is applied to each photo. You might want to apply two (or more) image effects to the same photo. For example, make the x-position control one effect and make the y-position control another effect.",
            "favorite_count":"19",
            "id":142,
            "love_count":"19",
            "resource_uri":"/api/v1/project/142/",
            "thumbnail":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/0/0142.png",
            "title":"PlayWithYourFace",
            "view_count":"669"
        },
        {  
            "creator":{  
                "username":"mres",
                "userprofile":{  
                    "bio":"I'm a professor at the MIT Media Lab. But more important: I'm a member of the Scratch Team! \n\nCheck out my TED talk about Scratch: http://bit.ly/mres-ted-talk",
                    "country":"United States",
                    "status":"I'm working on new technologies and activities to support the four P's of creative learning: Projects, Peers, Passion, and Play"
                }
            },
            "datetime_shared":"2007-03-28T14:01:50",
            "description":"This project was inspired by Toshio Iwai, an innovative artist and software designer from Japan. \r\n\r\nINSTRUCTIONS \r\nClick the Green Flag to start. Move the starfish and urchins to change the tune. (You can also use the ones at the bottom of the screen.) Place starfish higher and lower on the screen to play different notes. Move urchins higher and lower on the screen to get different drum sounds. Try changing the SPEED and INSTRUMENT sliders",
            "favorite_count":"18",
            "id":864,
            "love_count":"21",
            "resource_uri":"/api/v1/project/864/",
            "thumbnail":"//cdn.scratch.mit.edu/static/site/projects/thumbnails/0/0864.png",
            "title":"OceanMusicBox",
            "view_count":"239"
        }
    ]
}

Nutzer

GET /user/<username>/

Gibt Informationen zum angegebenen Benutzer zurück.

Beispielanfrage an den Server

GET https://scratch.mit.edu/api/v1/user/mres/

Beispielantwort von den Server

{ "username":"mres", "userprofile":{ "bio":"I'm a professor at the MIT Media Lab. But more important: I'm a member of the Scratch Team! \n\nCheck out my TED talk about Scratch: http://bit.ly/mres-ted-talk", "country":"United States", "status":"I'm working on new technologies and activities to support the four P's of creative learning: Projects, Peers, Passion, and Play" } }

GET /user/set/<usernames>/

Gibt Informationen zu den angegebenen Benutzern zurück. Namen sollten mit Semikolon getrennt werden. Der Wert "userprofile" für jedes Benutzerobjekt ist derzeit leer, wodurch diese Funktion der API praktisch unbrauchbar wird. Es ist zu beachten, dass die Einzelbenutzerfunktion funktionsfähig bleibt.

Beispielanfrage an den Server

GET https://scratch.mit.edu/api/v1/user/set/mres;Gaza101/

Beispielantwort von den Server

{ "objects":[ { "username":"mres", "userprofile":"" }, { "username":"Gaza101", "userprofile":"" } ] }

Referenzen

  1. "Die Site-API-Endpunkte sind ab heute alle veraltet." https://scratch.mit.edu/discuss/post/1552554/

Externe Links

Cookies helfen uns bei der Bereitstellung von Das deutschsprachige Scratch-Wiki. Durch die Nutzung von Das deutschsprachige Scratch-Wiki erklärst du dich damit einverstanden, dass wir Cookies speichern.