what's in a category

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

what's in a category

Timothy Hunt-2
I know that I can find what categories a page is in using api.php?
action=query&titles=Pagename&prop=categories
but how do I get all the pages that have are members of a particular  
category?  I'm guessing the format would be something like
api.php?action=query&titles=Category:Foo&property=SOMEPROPERTY,  
assuming it's implemented.

Thanks,

Timothy

_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: what's in a category

Roan Kattouw
Timothy Hunt schreef:

> I know that I can find what categories a page is in using api.php?
> action=query&titles=Pagename&prop=categories
> but how do I get all the pages that have are members of a particular  
> category?  I'm guessing the format would be something like
> api.php?action=query&titles=Category:Foo&property=SOMEPROPERTY,  
> assuming it's implemented.
>
> Thanks,
>
> Timothy
>
>  
api.php?action=query&list=categorymembers&cmcategory=Foo

In the future, please look at api.php?action=help first.

Roan Kattouw

_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: what's in a category

Timothy Hunt-2
In reply to this post by Timothy Hunt-2
I should have also commented, this is not for any of the project's  
wikis, but our own internal wiki - using MediaWiki 1.11.0

Timothy
On Oct 30, 2007, at 9:38 AM, Timothy Hunt wrote:

> I know that I can find what categories a page is in using api.php?
> action=query&titles=Pagename&prop=categories
> but how do I get all the pages that have are members of a particular
> category?  I'm guessing the format would be something like
> api.php?action=query&titles=Category:Foo&property=SOMEPROPERTY,
> assuming it's implemented.
>
> Thanks,
>
> Timothy
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>


_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: what's in a category

Bryan Tong Minh
If I recall correctly it is
action=query&list=categorymembers&cmtitle=category_name. See the help
on <http://www.mediawiki.org/wiki/Manual:API> under the list section.
Note that some lists had there arguments changed from titles ->
<xy>title somewhere around the release of 1.11. I'm not sure whether
that was actually before or after the release, but it may be that the
parameters for 1.12 are nto the same as for 1.11

Bryan

On Oct 30, 2007 3:42 PM, Timothy Hunt <[hidden email]> wrote:

> I should have also commented, this is not for any of the project's
> wikis, but our own internal wiki - using MediaWiki 1.11.0
>
> Timothy
>
> On Oct 30, 2007, at 9:38 AM, Timothy Hunt wrote:
>
> > I know that I can find what categories a page is in using api.php?
> > action=query&titles=Pagename&prop=categories
> > but how do I get all the pages that have are members of a particular
> > category?  I'm guessing the format would be something like
> > api.php?action=query&titles=Category:Foo&property=SOMEPROPERTY,
> > assuming it's implemented.
> >
> > Thanks,
> >
> > Timothy
> >
> > _______________________________________________
> > Mediawiki-api mailing list
> > [hidden email]
> > http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> >
>
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: what's in a category

Roan Kattouw
Bryan Tong Minh schreef:
> If I recall correctly it is
> action=query&list=categorymembers&cmtitle=category_name.
It's not, it's cmcategory. Look at api.php?action=help , which is always
right.
> See the help
> on <http://www.mediawiki.org/wiki/Manual:API> under the list section.
> Note that some lists had there arguments changed from titles ->
>  
The docs are incorrect then, I'll update them.
> <xy>title somewhere around the release of 1.11. I'm not sure whether
> that was actually before or after the release, but it may be that the
> parameters for 1.12 are nto the same as for 1.11
>  
I've checked, and it was cmcategory even when 1.11 was released.

Roan Kattouw


_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: what's in a category

Timothy Hunt-2
In reply to this post by Bryan Tong Minh
Ahh, knowing it is a list query helped me find the right part of the  
docs
action=query&list=categorymembers&cmcategory=category_name
is the format

Thanks,

Timothy
On Oct 30, 2007, at 9:46 AM, Bryan Tong Minh wrote:

> If I recall correctly it is
> action=query&list=categorymembers&cmtitle=category_name. See the help
> on <http://www.mediawiki.org/wiki/Manual:API> under the list section.
> Note that some lists had there arguments changed from titles ->
> <xy>title somewhere around the release of 1.11. I'm not sure whether
> that was actually before or after the release, but it may be that the
> parameters for 1.12 are nto the same as for 1.11
>
> Bryan
>
> On Oct 30, 2007 3:42 PM, Timothy Hunt <[hidden email]>  
> wrote:
>> I should have also commented, this is not for any of the project's
>> wikis, but our own internal wiki - using MediaWiki 1.11.0
>>
>> Timothy
>>
>> On Oct 30, 2007, at 9:38 AM, Timothy Hunt wrote:
>>
>>> I know that I can find what categories a page is in using api.php?
>>> action=query&titles=Pagename&prop=categories
>>> but how do I get all the pages that have are members of a particular
>>> category?  I'm guessing the format would be something like
>>> api.php?action=query&titles=Category:Foo&property=SOMEPROPERTY,
>>> assuming it's implemented.
>>>
>>> Thanks,
>>>
>>> Timothy
>>>
>>> _______________________________________________
>>> Mediawiki-api mailing list
>>> [hidden email]
>>> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>>
>>
>>
>> _______________________________________________
>> Mediawiki-api mailing list
>> [hidden email]
>> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>>
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>


_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: what's in a category

Timothy Hunt-2
In reply to this post by Roan Kattouw

On Oct 30, 2007, at 9:36 AM, Roan Kattouw wrote:

> api.php?action=query&list=categorymembers&cmcategory=Foo
>
> In the future, please look at api.php?action=help first.
>
> Roan Kattouw
>
>

Thanks, I had looked at that, and having found the prop=categories, I  
was looking there, and missed that it was a list category.

Timothy

_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api