Expand all

ImageInfo

Constructor

new ImageInfo(api, [options]) #

Parameters:

Name Type Attributes Description
api mw.Api
options Object optional
Properties:
Name Type Attributes Default Description
language string optional
null

image metadata language

maxage number optional

cache expiration time, in seconds Will be used for both client-side cache (maxage) and reverse proxies (s-maxage)

Source:

Properties

iiextmetadatafilter #

Array of imageinfo extmetadata fields which are needed to construct an Image model.

Source:
Array of imageinfo extmetadata fields which are needed to construct an Image model.

iiprop #

Array of imageinfo API properties which are needed to construct an Image model.

Source:
Array of imageinfo API properties which are needed to construct an Image model.

Methods

get(file) → {jQuery.Promise} #

Runs an API GET request to get the image info.

Parameters:

Name Type Description
file mw.Title

Returns:

a promise which resolves to an Image object.

Type
jQuery.Promise
Source:
Runs an API GET request to get the image info.