[Mediawiki-l] problem with cmsort

Platonides Platonides at gmail.com
Wed Apr 18 17:42:02 UTC 2012


El 16/04/12 17:51, Marcelo Chiaradía escribió:
> Hello everyone,
> 
> Im trying the mediawki API.
> 
> I need to get the members of given category, ordered by timestamp, which
> are beetwen 2 given dates.
> 
> for this, Im trying with an url like this:
> 
> http://localhost/mediawiki-1.17.0/api.php?action=query&generator=categorymembers&gcmtitle=Category:MY_CATEGORY&prop=info&cmsort=timestamp&format=json&cmstart=13345853310&cmend=1334585350&cmdir=asc<http://localhost/mediawiki-1.17.0/api.php?action=query&generator=categorymembers&gcmtitle=Category:ObjetoDeAprendizaje&prop=info&cmsort=timestamp&format=json&cmstart=13345853310&cmend=1334585350&cmdir=asc>
> 
> and
> 
> http://localhost/mediawiki-1.17.0/api.php?action=query&generator=categorymembers&gcmtitle=Category:ObjetoDeAprendizaje&prop=info&cmsort=timestamp&format=json&cmstart=2011-04-15T15:30:23Z&cmend=<http://localhost/mediawiki-1.17.0/api.php?action=query&generator=categorymembers&gcmtitle=Category:ObjetoDeAprendizaje&prop=info&cmsort=timestamp&format=json&cmstart=13345853310&cmend=1334585350&cmdir=asc>
> 2012-04-15T15:30:23Z<http://localhost/mediawiki-1.17.0/api.php?action=query&generator=categorymembers&gcmtitle=Category:ObjetoDeAprendizaje&prop=info&cmsort=timestamp&format=json&cmstart=13345853310&cmend=1334585350&cmdir=asc>&cmdir=asc
> 
> 
> But none of them worked. Am i doing something wrong? Im going crazy with
> this.
> 
> Regards,
> 
> Marcelo.

You seem to be using UNIX timestamps.
Use a timestamp like 20120415153023 (MediaWiki format)





More information about the MediaWiki-l mailing list