Reading/Reading List Service

From MediaWiki.org
Jump to navigation Jump to search

The Reading List Service is the backend for syncing reading lists between different devices. It consists of two components: the ReadingLists MediaWiki extension and a RESTBase service. The RESTBAse part (found in v1/lists.yaml and v1/lists.js fetches page summaries and adds them to certain responses; other than that it just acts as a proxy between MediaWiki and the client and translates between REST semantics and the format expected by the MediaWiki API.

Development[edit]

Use the readinglists vagrant role.

  • To run the MediaWiki tests: php /vagrant/mediawiki/tests/phpunit/phpunit.php --wiki=wiki /vagrant/mediawiki/extensions/ReadingLists/tests
  • To debug the RESTBase component: sudo -u www-data NODE_PATH=/vagrant/srv/restbase/node_modules RESTBASE_PORT=7231 /usr/bin/nodejs [--inspect] server.js -c /vagrant/srv/restbase/config.vagrant.yaml -n0 | jq .
  • To run the RESTBase tests: sudo -u www-data RB_TEST_BACKEND=sqlite RB_TEST_CONFIG=/vagrant/srv/restbase/config.vagrant.yaml mocha --inline-diffs --async-only [--grep <test name>] [--inspect]

See also[edit]