Hot answers tagged

3 votes
Accepted

How to find questions that were posted or edited recently?

There really is no particularly satisfactory way to do this since all versions of last_activity_date conflate a question's activity with the activity of its answers. You are going to have to fetch ...
  • 12.7k
3 votes
Accepted

Is it possible to have no sorting - to just show results in order of inputted IDs?

This is a classic "procedural" (or "row based" or "sequential") versus "set based" issue. See Understanding “Set based” and “Procedural” approaches in SQL or any one of thousands of similar articles. ...
  • 12.7k
3 votes

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 ...
  • 12.7k
2 votes
Accepted

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 ...
  • 5,572
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 ...
  • 12.7k
1 vote

Sort Best First

Test cases: The good: Under ‘Passing a string literal as a type argument to a class template’, the ‘Votes’ order currently places an answer with a not-quite-solution workaround (+56 / −2) first. The ...
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:
  • 5,572
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 ...
  • 12.7k
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 ...
  • 12.7k

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