[openspending-dev] Returning datasets' templates through the API

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Thu Aug 9 07:45:32 UTC 2012


Hey,

wouldn't you just add this as an attribute to the Dataset model and
thus serialize it with the dataset (i.e. /<dataset>.json)?

Cheers,

 - Friedrich

On Thu, Aug 9, 2012 at 1:52 AM, Vitor Baptista <vitor at vitorbaptista.com> wrote:
> Hi,
>
> I'm playing with the idea of using templates to define how a dataset's
> entries are shown on the global search page
> (http://openspending.org/datasets/entries), but I found a interesting
> problem.
>
> The issue is that we need a good way to show search results, and as there's
> no standard columns for the dataset, we can't figure out what are the
> important ones. Showing everything generates too much noise. Friedrich's
> idea was to make the user able to create a mustache template for his/her
> datasets, so he/she can decide what's important.
>
> But, considering that we have those templates, how to get them from the API?
> I think it doesn't make sense to put it as another attribute in
> /api/2/search, because it's only relevant to openspending.org (is it?).
>
> Creating a new API endpoint, or adding a new parameter to search, seems like
> the best solution. What do you think?
>
> Cheers!
> Vítor.
>
> _______________________________________________
> openspending-dev mailing list
> openspending-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/openspending-dev
>




More information about the openspending-dev mailing list