On Fri, May 3, 2013 at 2:04 AM, Chux chux18@gmail.com wrote:
I am trying to retrieve the templates associated to a page: http://en.wikipedia.org/w/api.php?action=query&prop=templates&format...
So in this scenario, I am able to get a list, but I noticed some of the listed templates here are marked as protected. I am not able to see any attribute in the results that shows this flag.
Any ideas on how can I filter those out?
There is no way to filter them out such that they aren't returned from the query. But you can easily enough retrieve the protection information for each of the returned templates by using templates as a generator, so you can filter them out on the client side:
http://en.wikipedia.org/w/api.php?action=query&generator=templates&f...