Thanks for your reply.
`action=ask&conditions=Category:Event|OnDate::>2017/05/15&printouts=NameOfEvent|OnDate¶meters=sort=OnDate|order=asc`
is the final call I used and it works. I am doing this with python’s requests modules,
that already takes care of urlencoding the dictionary I feed in.
Happy that all ask’s options work flawlessly also with askarg, by simply adjusting the
syntax (eg not using square brackets), and wanted to share in case someone else look up
for this and stumble upon the mailing list.
André
On 04 May 2017, at 21:56, Jeroen De Dauw
<jeroendedauw(a)gmail.com> wrote:
Hey Andre,
You might need to urlencode the values. I have the suspicion that the slashes are causing
the problem. I'd not, could you provide the error you get?
Sent from my mobile device.
On May 2, 2017 23:38, "André Fincato" <andre(a)andrefincato.info
<mailto:andre@andrefincato.info>> wrote:
Hello,
I’m currently converting
`action=ask&query=[[Category:Event]][[OnDate::<2017/05/03]] + etc` to use
`action=askargs`.
So far I stripped away the double square brackets around Category:Event, and it gives
back results.
`action=ask&conditions=Category:Event&printouts=NameOfEvent`
If I try to filter Category:Event by today’s date as above though, I get an error back,
in all the following combination:
*
`action=ask&conditions=Category:Event[[OnDate::<2017/05/03]]&printouts=NameOfEvent`
*
`action=ask&conditions=Category:EventOnDate::<2017/05/03&printouts=NameOfEvent`
*
`action=ask&conditions=Category:Event|OnDate::<2017/05/03&printouts=NameOfEvent`
*
`action=ask&conditions=Category:Event&OnDate::<2017/05/03&printouts=NameOfEvent`
Is it possible to use any similar syntax and filter upfront pages based on properties?
The only reason why I am try to switch to askargs, is that, unlike ask, it has a
query-continue-offset.
Thanks,
André
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org <mailto:Mediawiki-api@lists.wikimedia.org>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
<https://lists.wikimedia.org/mailman/listinfo/mediawiki-api>
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api