Nicolas Vervelle | 4 Jan 2008 20:47
Picon

Request for redirect info in backlinks query

Hi,

(I also posted this at http://www.mediawiki.org/wiki/Talk:API:Query_-_Lists)

Hi,

I see that the backlinks query can already filter results depending if a 
backlink is a redirect or not (with blfiterredir) but I don't see a way 
to see in the result if backlinks are actually redirect or not. Could it 
be added to the API ?

I need to retrieve all backlinks (recursively through redirects), so 
currently I call recursively the backlinks query and the redirect query. 
Retrieving the 2 informations in one query would be very useful for me 
to speed up requests ;)

I quickly looked at the code of the backlinks query and it seems simple 
to do (I may be overlooking things because I don't know how the API is 
working) :
* In run(), call $this->addField('page_is_redirect'); if needed.
* In extractRowInfo(), add something like $vals['redirect'] = 
intval($row->page_is_redirect);.

Thanks in advance for any answer :)

Nico
marion.leclerc | 4 Jan 2008 22:05

Marion Leclerc/France/Equant is out of the office. : Request for redirect info in backlinks query

I will be out of the office starting  24/12/2007 and will not return until 07/01/2008.

I will respond to your message when I return.
For urgent problem on:
   - Reporting Projects, please contact 'XNMS-ACC Staff' team        - Inventory & Resource Assignment Projects,
please contact 'xnms-adm project' team
Roan Kattouw | 4 Jan 2008 23:13
Picon
Favicon

Re: Request for redirect info in backlinks query

Nicolas Vervelle schreef:
> Hi,
>
> (I also posted this at http://www.mediawiki.org/wiki/Talk:API:Query_-_Lists)
>
> Hi,
>
> I see that the backlinks query can already filter results depending if a 
> backlink is a redirect or not (with blfiterredir) but I don't see a way 
> to see in the result if backlinks are actually redirect or not. Could it 
> be added to the API ?
>
> I need to retrieve all backlinks (recursively through redirects), so 
> currently I call recursively the backlinks query and the redirect query. 
> Retrieving the 2 informations in one query would be very useful for me 
> to speed up requests ;)
As I replied on mediawiki.org, you should use 
api.php?action=query&generator=backlinks&gbltitle=My_page&prop=info

Roan Kattouw (Catrope)
S. Nunes | 5 Jan 2008 01:47
Picon
Gravatar

Re: Retrieving Size - bug?

Regarding this issue, please consider voting on this bug:

http://bugzilla.wikimedia.org/show_bug.cgi?id=12188

Having access to all size values would be important for my research.

Thanks!
--
Sérgio Nunes

On Nov 30, 2007 5:34 PM, Yuri Astrakhan <yuriastrakhan@...> wrote:
> Please file request to run a size recompute on the entire wiki as a
> bugzilla request (not in the API category) - admins tend to run this
> kinds of scripts once in a while.  It will be much easier then
> updating databases on the fly during "read" queries.
>
>
> On Nov 30, 2007 12:30 PM, S. Nunes <snunes@...> wrote:
> > On Nov 28, 2007 3:56 PM, Roan Kattouw <roan.kattouw@...> wrote:
> > >
> > > > Can't you rebuilt the sizes for the old entries?
> > > >
> > > No, that'd require an insane amount of work for the servers and wouldn't
> > > serve any real purpose.
> >
> > Maybe you could consider computing the size of a revision only when it
> > is specifically requested (and then store it).
> > This would surely lighten the load of the servers and eventually all
> > old entries would have the size computed.
> >
(Continue reading)

Bryan Tong Minh | 14 Jan 2008 12:59
Picon
Gravatar

Protection according to 'rights' or 'groups'

Hello,

I have a question between the difference between rights and groups in
protection. When I request the protection of a page, for example
<http://commons.wikimedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Main%20Page>
the following is given for protection:

        <protection>
          <pr type="edit" level="autoconfirmed" expiry="infinity" />
          <pr type="move" level="sysop" expiry="infinity" />
        </protection>

When I ask my userinfo
<http://commons.wikimedia.org/w/api.php?action=query&prop=revisions&meta=userinfo&uiprop=rights|groups>:

    <userinfo name="Bryan">
      <groups>
        <g>checkuser</g>
        <g>sysop</g>
      </groups>
      <rights>
 [...]
        <r>autoconfirmed</r>
        <r>skipcaptcha</r>
        <r>emailconfirmed</r>
      </rights>
    </userinfo>

To abe able to edit the page, one needs to be 'autoconfirmed' which is
a right. In order to be able to move a page, one needs to be 'sysop'
(Continue reading)

Rotem Liss | 14 Jan 2008 13:03

Re: Protection according to 'rights' or 'groups'

Bryan Tong Minh wrote:
> Hello,
> 
> I have a question between the difference between rights and groups in
> protection. When I request the protection of a page, for example
> <http://commons.wikimedia.org/w/api.php?action=query&prop=info&inprop=protection&titles=Main%20Page>
> the following is given for protection:
> 
>         <protection>
>           <pr type="edit" level="autoconfirmed" expiry="infinity" />
>           <pr type="move" level="sysop" expiry="infinity" />
>         </protection>
> 
> When I ask my userinfo
> <http://commons.wikimedia.org/w/api.php?action=query&prop=revisions&meta=userinfo&uiprop=rights|groups>:
> 
>     <userinfo name="Bryan">
>       <groups>
>         <g>checkuser</g>
>         <g>sysop</g>
>       </groups>
>       <rights>
>  [...]
>         <r>autoconfirmed</r>
>         <r>skipcaptcha</r>
>         <r>emailconfirmed</r>
>       </rights>
>     </userinfo>
> 
> To abe able to edit the page, one needs to be 'autoconfirmed' which is
(Continue reading)

Roan Kattouw | 14 Jan 2008 15:20
Picon
Favicon

Re: Protection according to 'rights' or 'groups'

Bryan Tong Minh schreef:
> To abe able to edit the page, one needs to be 'autoconfirmed' which is
> a right. In order to be able to move a page, one needs to be 'sysop'
> which is a group. So can protection be set for both groups and rights?
> I'm asking because I need to check in my framework whether there are
> sufficient rights for an action.
>
> Bryan
>   
Actually, sysop is both a right *and* a group. The same is true for 'bot'.

Roan Kattouw (Catrope)
Bryan Tong Minh | 14 Jan 2008 15:23
Picon
Gravatar

Re: Protection according to 'rights' or 'groups'

On Jan 14, 2008 3:20 PM, Roan Kattouw <roan.kattouw@...> wrote:
> Bryan Tong Minh schreef:
> > To abe able to edit the page, one needs to be 'autoconfirmed' which is
> > a right. In order to be able to move a page, one needs to be 'sysop'
> > which is a group. So can protection be set for both groups and rights?
> > I'm asking because I need to check in my framework whether there are
> > sufficient rights for an action.
> >
> > Bryan
> >
> Actually, sysop is both a right *and* a group. The same is true for 'bot'.
>
> Roan Kattouw (Catrope)
>
>
> _______________________________________________
> Mediawiki-api mailing list
> Mediawiki-api@...
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
Then why is sysop only in groups in the api call?

Bryan
VasilievVV | 14 Jan 2008 15:27
Picon

Re: Protection according to 'rights' or 'groups'

Roan Kattouw writes:
> Bryan Tong Minh schreef:
>   
>> To abe able to edit the page, one needs to be 'autoconfirmed' which is
>> a right. In order to be able to move a page, one needs to be 'sysop'
>> which is a group. So can protection be set for both groups and rights?
>> I'm asking because I need to check in my framework whether there are
>> sufficient rights for an action.
>>
>> Bryan
>>   
>>     
> Actually, sysop is both a right *and* a group. The same is true for 'bot'.
>
> Roan Kattouw (Catrope)
No, there's no right called "sysop". "sysop" protection level is 
rewitten as "protect" when permission check on permission check.
--VasilievVV
Nicolas Vervelle | 14 Jan 2008 18:20
Picon

Parameter apprefix for allpages request

Hi,

When looking at the documentation you get when callling the API, the 
apprefix parameter is documented as "Search for all page titles that 
begin with this value" but I don't get any result when I try to use it.

For example, the following request returns zero pages :
http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=Bal&apfrom=bal

How do you use apprefix ?

Nico

Gmane