Jump to content

Wikifeeds

From mediawiki.org


Wikifeeds is a Node.js service that provides content used in the featured content feeds of the Wikimedia Apps . It was originally written as part of the Mobile Content Service, and later split out into a separate service.

Code repository: https://gerrit.wikimedia.org/g/mediawiki/services/wikifeeds

Deployment steps: Wikifeeds/Deployment Process

Endpoints

[edit]

.../feed/announcements

[edit]

Stability: experimental

This endpoint is meant to provide information about surveys and fundraising announcements for the iOS and Android apps only. It is experimental to the extent that it might significantly change or even go away in the future, more likely than other experimental endpoints. Client should code very defensively about the structure and the existence of this endpoint. If a client gets 404s, an exponential backoff strategy may be advisable.

Examples: Prod | Beta cluster | Labs | Local RB | Local Wikifeeds

See the announcement config spec: Wikimedia Apps/Team/RESTBase services for apps/Feed announcement config spec

.../feed/featured/{yyyy}/{mm}/{dd}

[edit]

Stability: unstable

This endpoint provides an aggregation of feed related microservices for one specific day. Note that year has to be exactly four digits, and month and day have to be two digits. Pad with 0 if needed. Earliest year supported is 2016. Example: 2016/07/01.

The response contains the following properties:

  • tfa: featured article (WP languages supported: bg, bn, bs, cs, de, el, en, fa, he, hu, ja, la, no, sco, sd, sv, ur, vi, zh) Latest list and implementation
  • image: featured image of the day (from Wikimedia Commons)
  • mostread: a list of the previous day's top read articles
  • news: current news, irrespective of day requested. This item is only available for a few wikis right now: da, de, el, en, es, fi, fr, he, ko, no, pl, pt, ru, sv, vi. Latest list and implementation if you want to help us expand it to more languages.

While the other feed microservices are implemented in Wikifeeds they are not exposed via RESTBase at this time. Some example URIs to just invoke the microservices locally is in the README.md of the source repo.

Examples: Prod | Beta cluster | Labs | Local RB | Local Wikifeeds (Aggregated feed for Febuary 6th, 2017)

For debugging: Local Wikifeeds routes of microservices: tfa | image | mostread | news (news in Wikifeeds directly is always current, not easy to get to historic content, recent versions of the aggregated RESTBase endpoint try to preserve historical news as much as possible)

Note: Not all feed content may be supported for all languages.

.../feed/onthisday/{type}/{mm}/{dd}

[edit]

Stability: experimental

This endpoint provides information about what event which happened on a specific day and month of the year. Note that month and day have to be two digits. Pad with 0 if needed. Example: selected/07/01. Supported types of events and some examples:

Note: May not be supported for all languages.

.../page/random/{format}

[edit]

Stability: unstable

Wikifeeds provides the title format. All other formats (summary and mobile-sections-lead) are provided by RESTBase. See T132597 (Agree on feed endpoints).

This endpoint tries to provide more interesting pages in its result than a straight random MW API query. It prefers pages with a lead image, WD description, and longer text extract.

Examples: