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

Method message_count

scratchattach/site/user.py:322–330  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

320 return None
321
322 def message_count(self):
323 return json.loads(
324 requests.get(
325 f"https://api.scratch.mit.edu/users/{self.username}/messages/count/?cachebust={random.randint(0, 10000)}",
326 headers={
327 "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.3c6 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36",
328 },
329 ).text
330 )["count"]
331
332 def featured_data(self):
333 """

Callers 3

__rich__Method · 0.95
_updaterMethod · 0.45
test_userFunction · 0.45

Calls 1

getMethod · 0.45

Tested by 1

test_userFunction · 0.36