Commit graph

14 commits

Author SHA1 Message Date
Alex Monk 378c5ab4cf Split apihelp messages to a separate file
Bug: T189982
Change-Id: Ibcd42f3d69843e22783507d790118d4ad0d159ad
2019-08-25 02:35:02 +01:00
Michael Holloway a9af75cbc4 Hygiene: Remove legacy 'original' property from 'thumbnail' output
Original image info is now a first-class output property, and the
'original' property of the 'thumbnail' object has been deprecated since
December 2016 (with an API warning provided since then when original image
info is requested).  It should be safe to remove at this point.

(N.B. The 'original' property was an undocumented piprop before the format
update, and the legacy output likely sees little if any usage.)

Bug: T152163
Change-Id: I73b476f9e50c14f705a30e20bc836b8db371f5f0
2017-10-30 17:48:04 -04:00
Brad Jorsch 889c17408e API: Split description messages into summary + additional text
See MediaWiki core patch I778bab2b

Change-Id: Ib19e10fd7519e13500493b8082c67684cead1832
2017-06-09 11:59:25 -04:00
Translation updater bot e53154dae0 Localisation updates from https://translatewiki.net.
Change-Id: I59d71e7df7ff4a37219a53b66fab3b4661b36a6f
2017-01-18 22:18:56 +01:00
Michael Holloway a8c7cbc870 API: Surface dimensions when requesting original image info
It's useful for API consumers to have the dimensions of the original
image so that they know the bounds within which they can safely rewrite
the thumb URL (bearing in mind the prerendered widths[1], in the case of
WMF wiki consumers).

This change adds an 'original' property to the page object, containing
the original image source URL along with its width and height, when
original image info is requested.

A warning is added when original image info is requested, noting the
format change and warning the consumer that the original image URL will
no longer be provided within the 'thumbnail' property in a future release.

[1] https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L17535

Bug: T152163
Change-Id: I9d937f73a974dfb099b93552405531464b8ad3ae
2017-01-17 15:07:28 -05:00
Baha 382c70f981 Allow querying non-free images too
The API accepts a new query parameter `license`, whose
value can either be `free` or `any`. `free` is the default value.

When the value of `licence` is:
  * `free`, then only the best image whose copyright allows
    reusing it will be returned;
  * `any`, then the best image, regardless of its copyright
    status, will be returned.

Bug: T131105
Change-Id: I83ac5266e382d2d121aff3f7d28711787251c03b
2016-11-21 17:29:25 -05:00
S Page cc9d7b143f Add example to ApiQueryPageImages via getExamplesMessages
Bug: T89035
Change-Id: Ia3410a35d7bfb1c234f2356b272c56a94cb11efb
2015-10-08 18:01:21 -07:00
Translation updater bot 1dc00fabd2 Localisation updates from https://translatewiki.net.
Change-Id: I78cc8eb2b593961a8e2f572e47a45c6043e64f97
2015-03-24 22:26:19 +01:00
Brad Jorsch a9e4c40fe5 Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-10-29 16:37:38 -04:00
Translation updater bot a10fdfe42a Localisation updates from https://translatewiki.net.
Change-Id: I4dadbc811d422e288cb9155257769403f6024acc
2014-05-19 19:46:23 +00:00
Translation updater bot d6e96881d9 Localisation updates from https://translatewiki.net.
Change-Id: I5da0c13b0374b6958170bf4092371805b93032e1
2014-05-06 19:52:50 +00:00
wctaiwan 587bf22f51 Display page image on action=info
Show the page image as one item under "Basic information" on action=info.

Bug: 64178
Change-Id: Id561c817fdda057c9dd8beae275c3b978b4dd20a
2014-05-05 14:16:39 -07:00
Translation updater bot 9ce1ec2b14 Localisation updates from https://translatewiki.net.
Change-Id: I344eedb976f2a88ad129c6f20f568099a4e62aed
2014-04-16 15:45:44 +00:00
Siebrand Mazeland bddcacf7fb Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I5b344b529252da5c24e261d3cef3acafdbc14bf0
2014-03-28 12:12:22 +01:00