Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4102568
mw.echo.api.ForeignAPIHandler.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
mw.echo.api.ForeignAPIHandler.js
View Options
(
function
()
{
/**
* 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
* @param {boolean} [config.unreadOnly] Whether this handler should request unread
* notifications by default.
*/
mw
.
echo
.
api
.
ForeignAPIHandler
=
function
MwEchoApiForeignAPIHandler
(
apiUrl
,
config
)
{
config
=
config
||
{};
// Parent constructor
mw
.
echo
.
api
.
ForeignAPIHandler
.
super
.
call
(
this
,
config
);
this
.
api
=
new
mw
.
ForeignApi
(
apiUrl
);
this
.
unreadOnly
=
config
.
unreadOnly
!==
undefined
?
!!
config
.
unreadOnly
:
false
;
};
/* Setup */
OO
.
inheritClass
(
mw
.
echo
.
api
.
ForeignAPIHandler
,
mw
.
echo
.
api
.
LocalAPIHandler
);
/**
* @inheritdoc
*/
mw
.
echo
.
api
.
ForeignAPIHandler
.
prototype
.
getTypeParams
=
function
(
type
)
{
let
params
=
{
// Backwards compatibility
notforn
:
1
};
if
(
this
.
unreadOnly
)
{
params
=
Object
.
assign
(
{},
params
,
{
notfilter
:
'!read'
}
);
}
return
Object
.
assign
(
{},
this
.
typeParams
[
type
],
params
);
};
}()
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 18, 17:30 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
63/ee/7856ecc103b378a0a83c7065e72a
Default Alt Text
mw.echo.api.ForeignAPIHandler.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment