scratch-api-unofficial-docs icon indicating copy to clipboard operation
scratch-api-unofficial-docs copied to clipboard

Add new studio API

Open micahlt opened this issue 3 years ago • 1 comments

Now that studios have been moved over to scratch-www from scratchr2, all of the comments, projects, activity, and curator APIs are accessible in a JSON format just like the rest of 3.0. The general format mostly seems to duplicate the existing Projects API. Just by looking at network requests that the studio page makes, I've gathered most of the endpoints:

  • GET /studios/1234567/projects/?limit=40&offset=0
  • GET /studios/1234567/comments/?limit=40&offset=0
  • GET /studios/1234567/curators/?limit=40&offset=0
  • GET /studios/1234567/managers/?limit=40&offset=0
  • GET /studios/1234567/activity/?limit=40&dateLimit=2021-06-05T13%3A39%3A30.000Z

And I have a few notes:

  • It's safe to say that the limit and offset parameters perform the same way as on the project page.
  • The activity request has a strange parameter called dateLimit which I believe is a URI-encoded Javascript date object. If I had to guess I'd say it shows any activity later than the specified date, regulated by the limit parameter. Edit: I was correct - see this line from scratch-www.
  • I have not investigated any of the POST-based endpoints yet. To-do!

micahlt avatar Jul 10 '21 14:07 micahlt

After further research, it appears that promotion, inviting, and removing curators has not moved away from the site-api endpoint (source).

micahlt avatar Jul 10 '21 15:07 micahlt