scratch-api-unofficial-docs
scratch-api-unofficial-docs copied to clipboard
Document uploading projects
I want to document https://projects.scratch.mit.edu (used in 3.0), not https://scratch.mit.edu/services/upload (used in 1.4 and offline 2.0) nor whatever online 2.0 uses.
At this point most relevant information is available, between LLK/scratch-storage#41 and LLK/scratch-gui#3021. (The scratch-projects PR mentioned in the scratch-gui issue is private, but it's for the backend code; we don't need to see it to know how to interface with it.)
Online 2.0 uses the same projects.scratch.mit.edu that 3.0 will be using. The routes are just being renamed and so far are just aliases for each other.
POST https://projects.scratch.mit.edu
(+ /projectID
and PUT
if updating) with parameter name sb3_file
, filename sb3_file
, body the .sb3
file (I think). Should be straightforward to test this. (I think it might already work, since I've seen some 3.0 projects on s.m.e, but not 100% sure.)
I haven't looked into this but there might be some changes incoming with Scratch 3.0, per LLK/scratch-gui#4015.