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:
...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:
- Fetch the
/questionsroute for each of the three sites.
- 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.