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

Method follow

scratchattach/site/user.py:958–967  ·  view source on GitHub ↗

Follows the user represented by the User object. You can only use this function if this object was created using :meth:`scratchattach.session.Session.connect_user`

(self)

Source from the content-addressed store, hash-verified

956 return requests.get(f"https://scratch.mit.edu/messages/ajax/user-activity/?user={self.username}&max={limit}").text
957
958 def follow(self):
959 """
960 Follows the user represented by the User object. You can only use this function if this object was created using :meth:`scratchattach.session.Session.connect_user`
961 """
962 self._assert_auth()
963 requests.put(
964 f"https://scratch.mit.edu/site-api/users/followers/{self.username}/add/?usernames={self._session._username}",
965 headers=headers,
966 cookies=self._cookies,
967 )
968
969 def unfollow(self):
970 """

Callers

nothing calls this directly

Calls 2

putMethod · 0.80
_assert_authMethod · 0.45

Tested by

no test coverage detected