[Wikitech-l] Re: APIi page generator namespace order

2024-02-22 Thread Bináris
Great, thank you! :)
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: APIi page generator namespace order

2024-02-22 Thread Lucas Werkmeister
For Special:UnconnectedPages in particular, we designed the underlying page
property so that it can be efficiently sorted or filtered by namespace (see
T300770  for details), so the
fact that it starts with main namespace pages is intentional and guaranteed
by the current code; I’d say this is unlikely to change soon, but I also
don’t think we consider it covered by the Wikidata Stable Interface Policy
.

For other query pages, it depends on the particular page; for
instance, Special:PagesWithProp
sorts by page_id

and Special:ShortPages by page_len
,
if I’m reading the code correctly.

Am Do., 22. Feb. 2024 um 06:36 Uhr schrieb Bináris :

> Hi,
> I query special pages through API (concretely Special:UnconnectedPages),
> and I noticed that main namespace articles are yielded first.
> It seems that pages are ordered by namespace numbers.
> Is it a guaranteed behaviour?
>
> (If so, I can break from the loop at te first page not in 0 namespace
> which would be nice.)
>
>
> --
> Bináris
> ___
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/



-- 
Lucas Werkmeister (he/er)
Software Engineer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30-577 11 62-0
https://wikimedia.de

Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de

Wikimedia Deutschland — Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Charlottenburg, VR 23855 B.
Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin,
Steuernummer 27/029/42207.
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/