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

https://docs.joinmastodon.org/methods/trends/#statuses does not document the sort order #1292

Open
nikclayton opened this issue Sep 2, 2023 · 1 comment

Comments

@nikclayton
Copy link

https://docs.joinmastodon.org/methods/trends/#statuses does not document the status sort order.

As far as I can tell, every other API call that returns an Array of Status returns them sorted by ID, greatest ID first.

/api/v1/trends/statuses does not do this.

At the time of writing (comments added to the shell output):

% curl -s https://mastodon.social/api/v1/trends/statuses | jq '.[] | .id'
"110993156080692938"   # <-- OK
"110993100663725000"   # <-- OK, less than previous entry
"110991377505473992"   # <-- OK, less than previous entry
"110993356930434838"   # <-- not OK, greater than all three previous entries
"110994790440934345"
"110994969037518867"
"110993372955365641"
"110994045539080889"
"110995529899922558"
"110995378605535724"
"110995385822431737"
"110995252446860759"
"110994722276318859"
"110993726425496697"
"110994378849093360"
"110995392607405730"
"110995293152118698"
"110995370486494187"
"110994608873854262"
"110992180569683389"

I am unsure if this is a bug in the code (I suspect it's sorting by some popularity algorithm, but have not confirmed this), or a bug in the documentation.

I saw this on mastodon.social, running v4.2.0-beta3+pr-26753-12e7b89

@trwnh
Copy link
Member

trwnh commented Sep 2, 2023

i think it's currently sorted by some interaction score with some time-based decay, yeah. but this isn't a guarantee in the API contract

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