Is it allowed to use a PHP script to create many levels?
1 month ago
Nord-Pas-de-Calais, France

Good evening,

I am a mod of some Picross S games.

In these games, levels names are basically "P001", "P002" ... "P150".

Am I allowed to use a PHP script to automatically submit requests to the SR.C API to create all necessary levels?

If yes, what is the rate limit to avoid being timed out/banned from the API?

Thanks in advance,

MarioSwitch

Somerset, England

Am I allowed to use a PHP script to automatically submit requests to the SR.C API to create all necessary levels?

Yes, however there aren't any v1 API endpoints to create levels, meaning you're gonna have to use v2 API - which is undocumented.

Also, I could give you how the endpoint works lol, from copying how the site does it.

Also, why are you using PHP? That's meant to be used to create web pages lmaođź’€

If yes, what is the rate limit to avoid being timed out/banned from the API?

I'm not sure about the rate limit. But you're not going to be banned, since I've done stuff like this before (check filters), and have also broke the site twice by sending too many API requests lol, and I haven't been banned.

Edited by the author 1 month ago
MarioSwitch likes this
Canada

Gotta ask, if the game has more levels than you're willing to add manually... do you really need to list them all? I don't know exactly how many levels we're talking about here, but having hundreds of empty categories that will most likely stay empty is generally not great. Would strongly recommend just listing the ones that people actually want to run so the leaderboard doesn't become a huge mess that's impossible to navigate.

MarioSwitch likes this
Nord-Pas-de-Calais, France

@YUMmy_Bacon5 Thanks for the answer! I know it's not the best idea, but I use cURL to send exactly the same requests as my web browser when I manually add a level. I've tested yesterday for 1-2 levels, and it works, so I've finalized the script yesterday evening, replacing level creation by writing a line in a file, in order to verify if all is good. I think I'll put a sleep(1) before every request to avoid being rate limited ;)

@ShikenNuggets Some people planned to run every level for Picross S9 (they have already done in S7 and S8) and I don't want to prevent them submitting a run because the level isn't created. Picross S9 has 335 levels, and Picross S+ 1,955 ones (it's a Nintendo Switch remake of all Picross e (1 to 9) games, originally released on Nintendo DS/3DS).