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.

Consider the following scenario: I need to retrieve a list of the latest questions asked on three different Stack Exchange sites. I throw together an application that hits up the following routes:

http://api.stackexchange.com/2.1/questions?site=stackoverflow
http://api.stackexchange.com/2.1/questions?site=superuser
http://api.stackexchange.com/2.1/questions?site=askubuntu

This works fine - the only concern is that I'm making three (essentially) identical requests that differ only in the site parameter specified.

I was thinking... wouldn't it be awesome if we could make the site parameter vectorized?

So then I would only be making a single request:

http://api.stackexchange.com/2.1/questions?site=stackoverflow;superuser;askubuntu

...and the response would contain an aggregate of all questions asked on any of those three sites (well, of course only the first 30 would be returned).

Is this feasible? I imagine the implementation on the server might look something like this:

  1. Fetch the /questions route for each of the three sites.
  2. Combine the results, taking the specified sort method into consideration.

...since I'm guessing (based on what I've heard) that you have the SQL table containing the questions for each site in a separate database.

share|improve this question
    
do you mean 3x30, or results from each site mixed into one set of 30? –  Jonathan. Oct 11 '12 at 21:23
    
@Jonathan: I was thinking the results for each site mixed into one set of 30. –  Nathan Osman Oct 11 '12 at 23:56
    
When I think of something like this, I think of something similar to if I were browsing the StackExchange site: stackexchange.com/questions –  KronoS Oct 15 '12 at 17:27

You must log in to answer this question.

Browse other questions tagged .