Closed hpiwowar closed 13 years ago
I think there's a way to do this that works well within the existing structure. Every plugin returns an array of Events; each of these has a metric_name and a metric_value. I suggest that metadata for a given artifact be returned as a separate Event. This is an event, after all: at a given time, "slideshare_meta" (for example) had a given value of {title:myslides, author:me}. Because this value has multiple properties, it should be stored as an object so we can preserve key:value pairs.
We already have plugins returning events per artifact, each with a different event_type. Adding another for
Ok, thinking about it, scratch the above. Instead, the returned Events should enclose everything a given Source returns in the "values" property. It doesn't make any sense to repeat all that stuff about the artifact type, icon, etc for a ten different metrics all from the same source. I've updated the wiki
Ok, last scratch that. I'm dumb.
Clearly, the simplest and easiest way is for each event to have its own object. So, {source:slideshare, metric_type:title, metric_value:my awesome title}. This is more adaptable and more accurate. Metric_value can take only strings, ints, and the special string "NA." I'm done now, really.
Can we also let Metric_value take negative ints and floats ? Guessing we might want to down the road.
sure, changed.
On 05/28/2011 12:32 PM, hpiwowar wrote:
Can we also let Metric_value take negative ints and floats ? Guessing we might want to down the road.
yay :)
We've settled on a return format, and it's detailed in the Tests/data section
oops, meant to close.
It would be nice to be able to display metadata about the artifact IDs (the article title and authors, the slideshare title and conference, the blog post name etc). In most cases this metadata can be gathered from the plugins, though in some cases there are "metadata-gathering plugins" that specialize in getting this directly (eg crossref). We don't currently have a way to handle this metadata well.