Jump to content

Topic on API talk:Links/Flow

Links used as generator and sequence order

1
CXuesong (talkcontribs)

I created a sandbox page on w:User:CXuesong/sandbox/1, and used prop=links to get all the linked pages. Note the sequence is ordered alphabetically here. Then I used generator instead. The result is unordered. As I have told in API talk:Search, for certain generators, they have "index" property in the JSON response and I can reorder the returned items, but for this case, there is no such property.

I'm not seeking for a change on the API. I just wonder, can I assume that the items in the pages property in the JSON response of generators are inherently unordered? (After all, it's a dictionary.) Because I have used generator=recentchanges to enumerate all the pages that have been changed recently, and I used to assume they are ordered chronologically. Was I wrong at that time?

Reply to "Links used as generator and sequence order"