mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
91a7833209
Change-Id: I24b697d59f9306b9cfa40372c5d4a92ba331b20b
37 lines
878 B
JavaScript
37 lines
878 B
JavaScript
( function ( mw, $ ) {
|
|
/**
|
|
* Foreign notification API handler
|
|
*
|
|
* @class
|
|
* @extends mw.echo.api.LocalAPIHandler
|
|
*
|
|
* @constructor
|
|
* @param {string} apiUrl A url for the access point of the
|
|
* foreign API.
|
|
* @param {Object} [config] Configuration object
|
|
*/
|
|
mw.echo.api.ForeignAPIHandler = function MwEchoApiForeignAPIHandler( apiUrl, config ) {
|
|
config = config || {};
|
|
|
|
// Parent constructor
|
|
mw.echo.api.ForeignAPIHandler.parent.call( this, config );
|
|
|
|
this.api = new mw.ForeignApi( apiUrl );
|
|
};
|
|
|
|
/* Setup */
|
|
|
|
OO.inheritClass( mw.echo.api.ForeignAPIHandler, mw.echo.api.LocalAPIHandler );
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
mw.echo.api.ForeignAPIHandler.prototype.getTypeParams = function ( type ) {
|
|
return $.extend( {}, this.typeParams[ type ], {
|
|
notfilter: '!read',
|
|
// Backwards compatibility
|
|
notnoforn: 1
|
|
} );
|
|
};
|
|
} )( mediaWiki, jQuery );
|