Skip to content
CubeyTheCube edited this page May 12, 2021 · 3 revisions

Properties

username

The username of the user

Example

print(session.get_user('you').username)
# you

id

The ID of the user.

joined_timestamp

The ISO string representing the date the user joined.

scratchteam

A boolean representing whether the user is a member of the Scratch Team.

profile

The UserProfile object for the user.

Example

print(session.get_user('jeffalo').profile.bio)
# i have released my brand new game maker plake!!

Methods

get_projects(all=False, limit=20, offset=0)

Gets a list of the user's shared projects. If the "all" parameter is set to True, it will get all of the user's projects. Returns an array of Project objects.

Example

print(session.get_user('griffpatch').get_projects()[0].title)
// Pacman HD with full Ghost AI (Scratch 2)

get_curating(all=False, limit=20, offset=0)

Gets a list of studios the user is curating. Returns an array of Studio objects.

Example

print(session.get_user('griffpatch').get_studios()[0].title)
// The Scratchnapped Series (The epic adventures of Scratch?)

get_favorites(all=False, limit=20, offset=0)

Gets a list of projects the user has favorited. Returns an array of Project objects.

get_followers(all=False, limit=20, offset=0)

Gets a list of users that are following the user. Returns an array of User objects.

Example

print(session.get_user('griffpatch').get_followers()[0].username)
// kaj

get_following(all=False, limit=20, offset=0)

Gets a list of users that the user is following. Returns an array of User objects.

Example

print(session.get_user('World_Languages').get_following()[0].username)
// RykerJohnson

get_message_count

Gets the message count of the user.

Example

print(session.get_user('isthistaken123').get_message_count())
// 90722

post_comment(content, parent_id="", commentee_id="")

Posts a comment on the user's profile.

Example

session.get_user('isthistaken123').post_comment('hello my friend', parent_id=140441449, commentee_id=143585)
session.get_user('griffpatch').post_comment('f4f?!?!?!')

report

Reports the user.

Example

session.get_user('griffpatch_alt').report("username")

follow

Follows the user.

Example

session.get_user('griffpatch').follow()

unfollow

Unfollows the user.

Example

session.get_user('griffpatch').follow()