Page MenuHomePhabricator

Omit news property for prior days in aggregated feed
Closed, ResolvedPublic

Description

If you access an older date for the aggregated feed and for a language which has news items, you'd still get today's news since we don't yet know how to request older news content.

Until T139481 is not resolved we should not include the news property for dates older than today in the aggregated feed endpoint.

So, for https://en.wikipedia.org/api/rest_v1/feed/featured/2016/07/11 there should not be a news property until we can provide the content from that date.

Event Timeline

I guess that should be done in RESTBase when the result is being constructed. This opens a question on what a prior day is? When to cut off the day?

@Pchelolo I was thinking the same thing… different for every Wiki I assume.

Is the date sent to the feed API expected to be local or UTC?

For instance in the link above:
https://en.wikipedia.org/api/rest_v1/feed/featured/2016/07/11

Is that 7/11 local or 7/11 UTC?

We use UTC everywhere else. So, it should be the same here for consistency sake.

I guess that should be done in RESTBase when the result is being constructed. This opens a question on what a prior day is? When to cut off the day?

I was thinking this could be done in MCS by returning a 204 response or empty object. Whatever you prefer is fine with me, though.

Mholloway claimed this task.

This has been done for a while.