Page MenuHomePhabricator

Simple REST API for querying page properties and status (patch included)
Closed, DeclinedPublic

Description

A simple extension that hanldes the "ask" action by returning properties asked
for by the "what" parameter. See
http://meta.wikimedia.org/wiki/REST#The_ask_Action for a specification of the
protocol.

a proof-of-concept patch will folow in a minute.


Version: 1.6.x
Severity: enhancement

Details

Reference
bz3700

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:52 PM
bzimport set Reference to bz3700.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 991
Ask.php - proof of concept

This patch is very basic, it would probably need a few changes, especially with
regards to security. Also, many interresting things can not yet be queried,
because the respective classes do not implement the methods needed.

To enable this ask action, put the following into LocalSettings.php:

include "includes/Ask.php";
$wgHooks['UnknownAction'][] = 'wfAskHook';

Attached:

Badly coupled to the internal object structure. An interface needs to be an external
layer.