Latest topics URL querystring syntax

I have been playing around with the latest topics URL and found out that you can do something like

/latest?ascending=false&order=activity&solved=no&status=open&before=3

The semantics of before=N puzzles me though. With different N I get different results, but N does not seem to mean days and also not a date in any format I can think of.

I tried things like

/latest?ascending=false&order=activity&solved=no&status=open&before=2018-03-15

and

/latest?ascending=false&order=activity&solved=no&status=open&before=100

but I don’t get the logic.

Can somebody explain how this works?

1 Like

before means topics.created_at < ? which is PARAM.to_i.days.ago

You also have bumped_before which looks at bumped_at date.

5 Likes

Great, thanks! Is there generally an overview/documentation of such parameters?

Mostly in the source code, this is very very ninja, our recommendation is just to rely on search here.

2 Likes