Recent changes & config variables

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

Recent changes & config variables

Brianna Laugher
Hi,

I know configuration variables such as $wgRCLinkDays
(<http://www.mediawiki.org/wiki/Manual:$wgRCLinkDays>) affect
Special:Recentchanges. Do they also affect how many RC edits you can
get out of the API?

e.g. if $wgRCLinkDays is set to 3, and I try and pull RCs from the
last 7 days via the API, will they all be there? Or will I just
silently get 3 days worth?

Are config variables like this accessible via the API? It doesn't seem
to me that they are.

thanks,
Brianna

--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/

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

Re: Recent changes & config variables

Robert Ullmann
This only affects the options offered on the RC page. It does not even
limit those (you can fill in a different number of days in the URL).
It has no effect on the API.

The limit on the API is the RC table itself, see
http://www.mediawiki.org/wiki/Manual:Recentchanges_table which
describes $wgRCMaxAge

It would be good if we could retrieve some of these things with the API.

Robert

On Tue, Jul 21, 2009 at 4:26 PM, Brianna
Laugher<[hidden email]> wrote:

> Hi,
>
> I know configuration variables such as $wgRCLinkDays
> (<http://www.mediawiki.org/wiki/Manual:$wgRCLinkDays>) affect
> Special:Recentchanges. Do they also affect how many RC edits you can
> get out of the API?
>
> e.g. if $wgRCLinkDays is set to 3, and I try and pull RCs from the
> last 7 days via the API, will they all be there? Or will I just
> silently get 3 days worth?
>
> Are config variables like this accessible via the API? It doesn't seem
> to me that they are.
>
> thanks,
> Brianna
>
> --
> They've just been waiting in a mountain for the right moment:
> http://modernthings.org/
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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

Re: Recent changes & config variables

Brianna Laugher
2009/7/22 Robert Ullmann <[hidden email]>:
> This only affects the options offered on the RC page. It does not even
> limit those (you can fill in a different number of days in the URL).
> It has no effect on the API.
>
> The limit on the API is the RC table itself, see
> http://www.mediawiki.org/wiki/Manual:Recentchanges_table which
> describes $wgRCMaxAge
>
> It would be good if we could retrieve some of these things with the API.

Indeed... it seems to me that any config variables that impact on
anything you access via the API could well be relevant.

Hmmm...I could probably even manage to write a patch to add this.
If we keep adding items to siprop in meta=siteinfo, will that be the
right place for them?

e.g. api.php?action=query&meta=siteinfo&siprop=rcmaxage

cheers
Brianna

--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/

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

Re: Recent changes & config variables

Roan Kattouw-2
2009/7/22 Brianna Laugher <[hidden email]>:
> Indeed... it seems to me that any config variables that impact on
> anything you access via the API could well be relevant.
>
> Hmmm...I could probably even manage to write a patch to add this.
I'd appreciate that. I currently have embarrassingly little time to
deal with API maintenance.

> If we keep adding items to siprop in meta=siteinfo, will that be the
> right place for them?
>
> e.g. api.php?action=query&meta=siteinfo&siprop=rcmaxage
>
It seems wasteful to add another siprop for this one number. Better
find an existing one that it fits in with (too tired to think of any
right now) or create a new one especially for this kind of stuff and
add more to it while you're at it.

Roan Kattouw (Catrope)

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

Re: Recent changes & config variables

Brianna Laugher
2009/7/25 Roan Kattouw <[hidden email]>:

> 2009/7/22 Brianna Laugher <[hidden email]>:
>> Indeed... it seems to me that any config variables that impact on
>> anything you access via the API could well be relevant.
>>
>> Hmmm...I could probably even manage to write a patch to add this.
> I'd appreciate that. I currently have embarrassingly little time to
> deal with API maintenance.
>
>> If we keep adding items to siprop in meta=siteinfo, will that be the
>> right place for them?
>>
>> e.g. api.php?action=query&meta=siteinfo&siprop=rcmaxage
>>
> It seems wasteful to add another siprop for this one number. Better
> find an existing one that it fits in with (too tired to think of any
> right now) or create a new one especially for this kind of stuff and
> add more to it while you're at it.

OK... so, like
api.php?action=query&meta=configsettings&csprop=rcmaxage ?
And then add other csprop values as relevant?

Brianna

--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/

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

Re: Recent changes & config variables

Roan Kattouw-2
2009/7/25 Brianna Laugher <[hidden email]>:
> OK... so, like
> api.php?action=query&meta=configsettings&csprop=rcmaxage ?
> And then add other csprop values as relevant?
>
What I really meant was making it another siprop, as in:

api.php?action=query&meta=siteinfo&siprop=configsettings&sisettings=foo|bar

Roan Kattouw (Catrope)

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

Re: Recent changes & config variables

Brianna Laugher
2009/7/25 Roan Kattouw <[hidden email]>:
> 2009/7/25 Brianna Laugher <[hidden email]>:
>> OK... so, like
>> api.php?action=query&meta=configsettings&csprop=rcmaxage ?
>> And then add other csprop values as relevant?
>>
> What I really meant was making it another siprop, as in:
>
> api.php?action=query&meta=siteinfo&siprop=configsettings&sisettings=foo|bar

Is there something else in the API that has works in a similar
fashion? To my thinking this is another level of nesting. I don't know
PHP well enough to write it from scratch, but if I can see something
that has basically the same structure I can adapt it.

... or maybe it should work similar to
api.php?action=query&meta=siteinfo&siprop=statistics - you just get
everything back and then figure out yourself which ones you're
interested in? After all for config variables, they're not going to be
costly to calculcate, so you could just as well put everything every
time.

Brianna

--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/

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

Re: Recent changes & config variables

Roan Kattouw-2
2009/7/26 Brianna Laugher <[hidden email]>:

> Is there something else in the API that has works in a similar
> fashion? To my thinking this is another level of nesting. I don't know
> PHP well enough to write it from scratch, but if I can see something
> that has basically the same structure I can adapt it.
>
> ... or maybe it should work similar to
> api.php?action=query&meta=siteinfo&siprop=statistics - you just get
> everything back and then figure out yourself which ones you're
> interested in? After all for config variables, they're not going to be
> costly to calculcate, so you could just as well put everything every
> time.
>
Yeah, that makes sense. Adapting the statistics code should work well.

Roan Kattouw (Catrope)

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

Re: Recent changes & config variables

Brianna Laugher
Well... not much luck:
https://bugzilla.wikimedia.org/show_bug.cgi?id=19937
https://bugzilla.wikimedia.org/show_bug.cgi?id=17027

Where does that leave wgRCMaxAge? It does affect the API, so can I at
least add it somewhere if nothing else? I am not really sure what the
alternative is.

cheers
Brianna

2009/7/26 Roan Kattouw <[hidden email]>:

> 2009/7/26 Brianna Laugher <[hidden email]>:
>> Is there something else in the API that has works in a similar
>> fashion? To my thinking this is another level of nesting. I don't know
>> PHP well enough to write it from scratch, but if I can see something
>> that has basically the same structure I can adapt it.
>>
>> ... or maybe it should work similar to
>> api.php?action=query&meta=siteinfo&siprop=statistics - you just get
>> everything back and then figure out yourself which ones you're
>> interested in? After all for config variables, they're not going to be
>> costly to calculcate, so you could just as well put everything every
>> time.
>>
> Yeah, that makes sense. Adapting the statistics code should work well.
>
> Roan Kattouw (Catrope)
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>



--
They've just been waiting in a mountain for the right moment:
http://modernthings.org/

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

Re: Recent changes & config variables

Platonides
Brianna Laugher wrote:

> Well... not much luck:
> https://bugzilla.wikimedia.org/show_bug.cgi?id=19937
> https://bugzilla.wikimedia.org/show_bug.cgi?id=17027
>
> Where does that leave wgRCMaxAge? It does affect the API, so can I at
> least add it somewhere if nothing else? I am not really sure what the
> alternative is.
>
> cheers
> Brianna

17027 exposed pretty much everything. The variables discussed here are
needed for the API and thus should still be added.



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