Skip to content

Commit 850dfe2

Browse files
committed
feat: update
1 parent 93ba051 commit 850dfe2

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/attach/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,22 @@ async def main():
3939
if __name__ == "__main__":
4040
asyncio.run(main())
4141
```
42+
43+
### update a sessiob using the `https://scratch.mit.edu/session` endpoint
44+
45+
```py
46+
import os
47+
import asyncio
48+
import scratchattach.async_api as sa
49+
from dotenv import load_dotenv
50+
51+
load_dotenv()
52+
53+
async def main():
54+
async with await sa.login_by_id(os.environ["SA_ID"]) as sess:
55+
sess.update()
56+
print(repr(sess))
57+
58+
if __name__ == "__main__":
59+
asyncio.run(main())
60+
``

0 commit comments

Comments
 (0)