theforumhelpers.github.io icon indicating copy to clipboard operation
theforumhelpers.github.io copied to clipboard

Update To New Studio

Open Accio1 opened this issue 4 years ago • 16 comments

Is your feature request related to a problem? The Forum Helpers has moved to a new studio, meaning that this site needs to be updated to reflect that! I have made a checklist below of what needs to be changed and features related to this that should be added. Feel free to discuss these features or request new ones!

  • [x] Update our studio link (Both on the homepage and in the header)
  • [x] After a few days when most people have joined the new studio, update the List of Forum Helpers page to only contain members of the current studio.
  • [x] #302
    • [ ] On the past members page, make it so that you can filter by truly past members (not in the current studio) or all members who were a part of the original Forum Helpers (This will require a new JSON key for either active or inactive).
    • [x] Resolve #268 before this. Then, bios on the past members page will be "frozen in time" and will not be updated. Bios on the main List of Forum Helpers page can still be updated
  • [ ] #358
    • [ ] Probably could also be a JSON file loaded similarly to the list of Forum Helpers (JSON keys for event name, description, and date)
  • [ ] #362
    • [ ] Either a separate page or some way to indicate studio hosts on the List of Forum Helpers page.

@leahcimto @gosoccerboy5

Accio1 avatar Aug 02 '21 14:08 Accio1

I've got an idea. Why, instead of manually updating the members list, don't we just use a GET request to https://api.scratch.mit.edu/studios/30136012/curators?

LankyBox01 avatar Aug 03 '21 16:08 LankyBox01

Run this:

let obj;

fetch('https://api.scratch.mit.edu/studios/30136012/curators')
  .then(response => response.json())
  .then(data => obj = data)

and then run this:

for (x in obj) {   
  console.log(obj[x].username);  
}

LankyBox01 avatar Aug 03 '21 16:08 LankyBox01

That only gets the first 20 members since it's paginated.

CST1229 avatar Aug 03 '21 16:08 CST1229

oh well, what if we do a run on both?

LankyBox01 avatar Aug 03 '21 16:08 LankyBox01

Both what? Managers and curators?

CST1229 avatar Aug 03 '21 16:08 CST1229

pages :)

LankyBox01 avatar Aug 03 '21 16:08 LankyBox01

And also we can GET from the API multiple times, with increasing ?offsets (increasing by 20) repeating until the response is [].

CST1229 avatar Aug 03 '21 16:08 CST1229

Then for each response we store them in an array and iterate through each item of each response to add the members.

CST1229 avatar Aug 03 '21 16:08 CST1229

ok all needed is now to get assigned

LankyBox01 avatar Aug 03 '21 16:08 LankyBox01

I've got an idea. Why, instead of manually updating the members list, don't we just use a GET request to https://api.scratch.mit.edu/studios/30136012/curators?

  1. Making API requests to Scratch requires a CORS Proxy.
  2. I don't want to spam Scratch's servers by making multiple requests each time someone loads the page.

Accio1 avatar Aug 03 '21 17:08 Accio1

Run this:

let obj;

fetch('https://api.scratch.mit.edu/studios/30136012/curators')
  .then(response => response.json())
  .then(data => obj = data)

sigh. that would be blocked because they're not the same url

gosoccerboy5 avatar Aug 03 '21 18:08 gosoccerboy5

oh

LankyBox01 avatar Aug 04 '21 13:08 LankyBox01

Making API requests to Scratch requires a CORS Proxy. I don't want to spam Scratch's servers by making multiple requests each time someone loads the page.

how about a github actions workflow to automatically create the curator list?

jeffalo avatar Aug 05 '21 13:08 jeffalo

how about a github actions workflow to automatically create the curator list?

pretty easy thing to do, i could do this if you guys allowed me to

FunctionalMetatable avatar Aug 07 '21 18:08 FunctionalMetatable

The site should also be updated accordingly with the new thumbnail.

leahcimto avatar Aug 29 '21 21:08 leahcimto

@Accio1 this is a main priority right now, correct?

leahcimto avatar Mar 27 '22 15:03 leahcimto