Hi devs and API enthusiasts!
Just wanted to call your attention to a change in the way posts are returned in the /post/list endpoint in the api. This hasn’t been backported, so only instances running 1.3.0-dev (the main branch) would currently have this change. The stable, 1.2.x branch is unaffected.
Now, when you are filtering to a single community (either by providing a community_name or a community_id), any sticky posts for that community will be returned as the first results of page 1, regardless of the sort order specified. This matches the web ui behavior where sticky posts are…well…stuck to the top of the community’s list of posts.
One aspect that is different than the web ui is that as you page through the posts, the api will not keep the sticky posts at the top of the results for pages 2+. This should make it easier to create a seamless flow from one page into the next for something like an infinite scroll since the sticky posts won’t keep showing up with each request for subsequent pages.
I added an ignore_sticky parameter that, when true, allows you to turn off the stickiness of posts when returning results. This should help for applications where you don’t care what posts are sticky or not, but you just want them sorted in a specific way.
Let me know if you have any questions or feedback!
Thanks for the explanation 👍
Nice



