Hot answers tagged

3 votes

Sort Best First

Test cases: The good: Much of the time, vote-weighing order successfully puts first a better-quality answer than the most popular one as measured by naïve score sort. Under ‘Passing a string literal ...
user3840170's user avatar
3 votes
Accepted

Is there any way or script to sort questions/posts/answers with custom criteria?

You can filter (not sort) questions (and to some extent answers) by using the /search/advanced route of the API. The q parameter allows most of the Advanced Search Options. For example, this will ...
Brock Adams's user avatar
  • 12.9k
2 votes

Is there any way or script to sort questions/posts/answers with custom criteria?

No, the API has a limited number of sort options (just like the website itself). The best you can do with the API is to fetch all results and then perform a client-side sort. Alternatively, use SEDE ...
Glorfindel's user avatar
  • 6,732
2 votes

Are the revisions returned by /posts/{ids}/revisions guaranteed to be returned in descending order?

I think creation_date is a default/universal sorting, unless activity_date is available. (But you know what they say happens when you "ASSUME".)‡ Evidence for: Seems like it would be ...
Brock Adams's user avatar
  • 12.9k
1 vote

Wrong sorting parameter in documentation for question/{ids}/answers

No, I think this is intentional. The word on the left side is the value of the sort parameter: while the word on the right side is a field name of the answer object:
Glorfindel's user avatar
  • 6,732
1 vote
Accepted

How to sort /questions/featured by bounty_closes_date

This is most likely one of those things you'll have to do yourself and one reason why the API is available. And, it's not too hard; here is pseudo code that works: Call /questions/featured with max ...
Brock Adams's user avatar
  • 12.9k
1 vote
Accepted

Absence of `order` and `sort` in rest calls?

Yes, much of the time, but: Do not assume this is so, since it is never explicitly promised. Some sortable routes do not even have an activity property (Example). In this answer, the lead API ...
Brock Adams's user avatar
  • 12.9k

Only top scored, non community-wiki answers of a minimum length are eligible