Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

account_following limited to 40 entries #376

Open
helioloureiro opened this issue Jul 19, 2024 · 3 comments
Open

account_following limited to 40 entries #376

helioloureiro opened this issue Jul 19, 2024 · 3 comments

Comments

@helioloureiro
Copy link

Hi,

Not sure whether I've some issue, or it is located on the instance (I use mastodon.social), but when I call account_following, I only get 40 entries. And my profile has more than 500.

In [14]: u = tt.mastodon.account_following(id=tt.me.id)

In [15]: len(u)
Out[15]: 40

I tried to set limit as None, but it didn't change much.

Here is my profile at mastodon where you can see it has much higher number of followings:

image

@helioloureiro
Copy link
Author

And I tried to increase by limit.

In [16]: u = tt.mastodon.account_following(id=tt.me.id, limit=80)

In [17]: len(u)
Out[17]: 80

In [18]: u = tt.mastodon.account_following(id=tt.me.id, limit=500)

In [19]: len(u)
Out[19]: 80

So at the least I'm getting the double as before, but it stills much smaller. Could this be related to #300 ?

@helioloureiro
Copy link
Author

helioloureiro commented Jul 19, 2024

I changed the code to use the result from account_following( ) as argument to fetch_remaining( ) and it did the trick.

So my suggestion for improvement is to inform it on documentation.

In [14]: u = tt.mastodon.account_following(id=tt.me.id, limit=None)

In [15]: len(u)
Out[15]: 40

In [16]: u = tt.mastodon.account_following(id=tt.me.id, limit=80)

In [17]: len(u)
Out[17]: 80

In [18]: u = tt.mastodon.account_following(id=tt.me.id, limit=500)

In [19]: len(u)
Out[19]: 80

In [20]: u2 = tt.mastodon.fetch_remaining(u)

In [21]: len(u2)
Out[21]: 525

@halcy
Copy link
Owner

halcy commented Dec 1, 2024

TODO: improve documentation on pagination somewhat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants