The ScratchAPIClient class provides a convenient interface for accessing data from the Scratch API using the "https://scratch-get-data.kokoiscool.repl.co" base URL.
-
Instantiating the ScratchAPIClient class: client = ScratchAPIClient()
-
Retrieving the follower count of a user: follower_count = client.get_follower_count(username)
-
Checking if a user is a Scratcher: is_scratcher = client.is_scratcher(username)
-
Retrieving the following count of a user: following_count = client.get_following_count(username)
-
Retrieving the "What I'm Working On" (WIWO) status of a user: wiwo_status = client.get_wiwo(username)
-
Retrieving the "About Me" information of a user: about_me = client.get_about_me(username)
-
Retrieving the messages of a user: messages = client.get_messages(username)
-
Retrieving the creator of a project: project_creator = client.get_project_creator(project_id)
-
Retrieving the name of a project: project_name = client.get_project_name(project_id)
-
Retrieving the description of a project: project_description = client.get_project_description(project_id)
-
Retrieving the instructions of a project: project_instructions = client.get_project_instructions(project_id)
-
Retrieving the blocks of a project: project_blocks = client.get_project_blocks(project_id)
-
Retrieving the title of a forum post: forum_title = client.get_forum_title(post_id)
-
Retrieving the category of a forum post: forum_category = client.get_forum_category(post_id)
-
Retrieving the country of a Scratch user: user_country = client.get_scratch_user_country(username)
-
See if a user exist: user_country = client.get_user_exist(username)
Note: Replace username
with the desired Scratch username and project_id
with the desired project ID.
API website: https://scratch-get-data.kokoiscool.repl.co
If you use GetData, please credit @kokofixcomputers.