feat: expose limit parameter of fetch_following
Pull request summary
This PR addresses the issue #216 exposing the parameter limit. It needs the PR #274 to work properly.
# test.py
import twitchio
import asyncio
async def main():
token = "<token>"
client = twitchio.Client(token=token)
try:
user = (await client.fetch_users(names=["s4"]))[0]
following = await user.fetch_following(limit=400)
names = set([f.to_user.name for f in following])
print(len(following), len(names)) # 400, 100
finally:
if client._http.session:
await client._http.session.close()
if __name__ == "__main__":
"""Run test."""
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(main())
Checklist
- [x] If code changes were made then they have been tested.
- [ ] I have updated the documentation to reflect the changes.
- [ ] I have updated the changelog with a quick recap of my changes.
- [x] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)
This is something that would have to be implemented on all pageable http methods for it to be considered
This is something that would have to be implemented on all pageable http methods for it to be considered
I converted it to draft for now. I will check how many pageable http methods there are later.
Hello, I'm closing this due to inactivity. If you wish to continue working on this, feel free to send a message or open a new PR. as it stands i believe this may be superseded by #359 so it might not be required