td
td copied to clipboard
Add a sugared wrapper around takeout functions
Description
Currently you have to manually start a takeout session and wrap all of your calls in a InvokeWithTakeout. It would be nice to have a wrapper which streamlines this process.
References
Here's how Telethon does it:
https://docs.telethon.dev/en/stable/modules/client.html#telethon.client.account.AccountMethods.takeout
They have a special client class which wraps all of the method calls in an InvokeWithTakeout.
Looking at it, it seems like currently you can't even easily invoke things with a takeout session at all? You have to manually wrap the request and run it with Invoke().