mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-15 03:35:01 +00:00
24a8bc23ef
This is in preparation for dealing with cross-wiki notifications where we may need several types of operations to extract bundled notifications from local and external APIs. Also, renamed files: * mw.echo.dm.AbstractAPIHandler -> mw.echo.dm.APIHandler * mw.echo.dm.APIHandler -> mw.echo.dm.LocalAPIHandler * All API-related handler files moved to their own folder for better organization. Change-Id: Ib730c780ea52c93a6026c5d0b22012b6f39bb50d
26 lines
627 B
JavaScript
26 lines
627 B
JavaScript
( function ( mw ) {
|
|
/**
|
|
* Foreign notification API handler
|
|
*
|
|
* @class
|
|
* @extends mw.echo.dm.LocalAPIHandler
|
|
*
|
|
* @constructor
|
|
* @param {string} apiUrl A url for the access point of the
|
|
* foreign API.
|
|
* @param {Object} [config] Configuration object
|
|
*/
|
|
mw.echo.dm.ForeignAPIHandler = function MwEchoDmForeignAPIHandler( apiUrl, config ) {
|
|
config = config || {};
|
|
|
|
// Parent constructor
|
|
mw.echo.dm.ForeignAPIHandler.parent.call( this, config );
|
|
|
|
this.api = new mw.ForeignApi( apiUrl );
|
|
};
|
|
|
|
/* Setup */
|
|
|
|
OO.inheritClass( mw.echo.dm.ForeignAPIHandler, mw.echo.dm.LocalAPIHandler );
|
|
} )( mediaWiki );
|