MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / connect_user

Method connect_user

scratchattach/site/session.py:1092–1102  ·  view source on GitHub ↗

Gets a user using this session, connects the session to the User object to allow authenticated actions Args: username (str): Username of the requested user Returns: scratchattach.user.User: An object that represents the requested user and allows you

(self, username: str)

Source from the content-addressed store, hash-verified

1090 return commons._get_object(identificator_name, identificator, __class, NotFoundException, self)
1091
1092 def connect_user(self, username: str) -> user.User:
1093 """
1094 Gets a user using this session, connects the session to the User object to allow authenticated actions
1095
1096 Args:
1097 username (str): Username of the requested user
1098
1099 Returns:
1100 scratchattach.user.User: An object that represents the requested user and allows you to perform actions on the user (like user.follow)
1101 """
1102 return self._make_linked_object("username", username, user.User, exceptions.UserNotFound)
1103
1104 @deprecated("Finding usernames by user ids has been fixed.")
1105 def find_username_from_id(self, user_id: int) -> str:

Callers 3

connect_linked_userMethod · 0.95
handle_nocmdFunction · 0.80
test_userFunction · 0.80

Calls 1

_make_linked_objectMethod · 0.95

Tested by 1

test_userFunction · 0.64