[Mediawiki-l] Mediawiki 1.12 new Api Question
Heilmannseder Tobias (LVT)
Tobias.Heilmannseder at liebherr.com
Fri Jun 27 12:11:23 UTC 2008
Hello List,
currently I am adopting the PreviewGallery Gadget originally developed by Magnus Manske.
Now I have a problem with the API.
Is it possible to get the Timestamps from Images like in the query.php?
The old version was:
query.php?what=categories&clextended&format=xml&titles=Bild:LC80.JPG
This creates the following Output: (as you can see with "timestamp" in the cl branch)
<yurik>
<perf>
<total startup="271" dbtime="1.2" time="294.7"/>
<pageInfo dbtime="0.7" time="22.4"/>
<categories dbtime="0.5" time="1"/>
</perf>
<pages>
<page>
<ns>6</ns>
<title>Bild:LC80.JPG</title>
<id>243</id>
<touched>20080625085045</touched>
<revid>797</revid>
<categories>
<cl ns="14" sortkey="Bild:LC80.JPG" timestamp="2008-06-25 08:50:45">Kategorie:Plattform 1</cl>
<cl ns="14" sortkey="Bild:LC80.JPG" timestamp="2008-06-25 08:50:45">Kategorie:Prospektfotos</cl>
</categories>
</page>
</pages>
</yurik> ......
Now with the NEW Api I am trying the following:
api.php?action=query&prop=categories&clprop=sortkey&format=xml&titles=Bild:LC80.JPG
I am getting almost the same, but not the timestamps:
<api>
<query>
<pages>
<page pageid="243" ns="6" title="Bild:LC80.JPG">
<categories>
<cl ns="14" title="Kategorie:Plattform 1" sortkey="Bild:LC80.JPG"/>
<cl ns="14" title="Kategorie:Prospektfotos" sortkey="Bild:LC80.JPG"/>
</categories>
</page>
</pages>
</query>
</api>
The official Documentation of the API tells me to use "clprop" as a parameter to "prop=categories" but it always throws the error "<error code="clunknown_clprop" info="Unrecognised value for parameter 'clprop'"/>" after appending "clprop=timestamp" to my calling routine.
Is there somebody who can help me?
Dipl.-Inform. (FH) Tobias Heilmannseder
Softwareentwickler
More information about the MediaWiki-l
mailing list