[openspending-dev] Returning datasets' templates through the API
Friedrich Lindenberg
friedrich.lindenberg at okfn.org
Thu Aug 9 15:15:52 UTC 2012
On Thu, Aug 9, 2012 at 5:10 PM, Vitor Baptista <vitor at vitorbaptista.com> wrote:
> Hi,
>
> On Aug 9, 2012 4:45 AM, "Friedrich Lindenberg"
> <friedrich.lindenberg at okfn.org> wrote:
>> wouldn't you just add this as an attribute to the Dataset model and
>> thus serialize it with the dataset (i.e. /<dataset>.json)?
>
> I might be optimizing too early, but if we follow this approach, there might
> be up to 16 requests for each result page (1 for the /api/2/search and 15
> for each result's dataset (I'm showing 15 results per page))
>
> Maybe an endpoint where I can pass a list of datasets and it returns all at
> once?
Let's see how bad the template calls are, first. Of course the worst
case is 15 (async) requests, but I think caching and multiple results
are likely to take the punch out of that...
- Fr.
More information about the openspending-dev
mailing list