Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I don't know if this is by design, but the ServerFault and SuperUser Meta sites don't follow their main sites in the response for the sites API route. Having linked_meta sites follow their main (normal) sites makes grouping sites much easier, so I'm hoping this will be fixed.

Also, their icon URLs currently return 404s, but I'm guessing that's only temporary.

share|improve this question
2  
code poet's answer is correct. This by design behavior, the ordering of /sites is not guaranteed. –  Kevin Montrose Jul 23 '10 at 1:32
    
can - do you mind putting a check mark on the answer to complete the workflow? –  Sky Sanders Sep 13 '10 at 0:54
    
@Sky: sorry it took me so long. I took some time off. –  Can Berk Güder Nov 7 '10 at 19:34
add comment

1 Answer

up vote 2 down vote accepted

The appearance order of sites in /sites is non-determinant and should not be relied upon.

On a personal note, using order of appearance as a grouping seems more complex than simply using a meta. modifier

I am certain that you can depend on the api.xxx.com/api.meta.xxx.com pattern and can assemble your grouping or relations.

And, no, i am no authority, but i do play one in my own mind. at night. when i am staying at a holiday inn express.

share|improve this answer
    
Do you always sleep with a gun under your pillow? –  Mark Henderson Jul 23 '10 at 1:38
    
Holiday Inn Express? A programmer??? –  Nathan Osman Jul 23 '10 at 1:41
2  
@far - i guess you need to be a yank to get that one. google.com/…; –  Sky Sanders Jul 23 '10 at 1:45
    
me no likey two-pass. thanks for the answer, though =) –  Can Berk Güder Jul 23 '10 at 14:13
    
@can - if you reverse the api_endpoint and sort (or do it in place) you will get what you want quite easily without having to parse the strings. –  Sky Sanders Jul 23 '10 at 14:44
    
@Code, my comment was a James Bond reference, but I didn't get the holiday in thing anyway. –  Mark Henderson Jul 26 '10 at 2:11
    
@code: I ended up comparing site_urls and moving linked_metas next to their main sites. I wanted to keep the main sites in response order. –  Can Berk Güder Jul 27 '10 at 13:24
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .