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)
| 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: |