mediawiki-extensions-Visual.../modules/ve-mw/init/apiresponsecache/ve.init.mw.GalleryImageInfoCache.js
James D. Forrester 2c77e88d2c doc: Bump copyright year for 2020
Change-Id: I30539877543dc2a57bd1428a00d10ac46d8fc294
2020-01-08 09:13:24 -08:00

43 lines
937 B
JavaScript

/*!
* VisualEditor MediaWiki Initialization GalleryImageInfoCache class.
*
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Get thumbnail URL information about gallery images.
*
* @class
* @extends ve.init.mw.ImageInfoCache
* @constructor
* @param {mw.Api} [api]
*/
ve.init.mw.GalleryImageInfoCache = function VeInitMwGalleryImageInfoCache() {
// Parent constructor
ve.init.mw.GalleryImageInfoCache.super.apply( this, arguments );
};
/* Inheritance */
OO.inheritClass( ve.init.mw.GalleryImageInfoCache, ve.init.mw.ImageInfoCache );
/* Methods */
/**
* @inheritdoc
*/
ve.init.mw.GalleryImageInfoCache.prototype.getRequestPromise = function ( subqueue ) {
return this.api.get(
{
action: 'query',
prop: 'imageinfo',
iiprop: 'url|size',
titles: subqueue,
iiurlwidth: 200,
iiurlheight: 200
},
{ type: 'POST' }
);
};