Friday, May 30, 2008

Using Yahoo! Pipes with WEB-Services

I recently struggled a bit with Yahoo! Pipes when playing with this great tool trying to form a properly updating RSS feed from a WEB-Service source. The WEB-Service in question is available through one of Ohloh's API : Project.

The issue was related to the <guid> field required by (most?) RSS Aggregators (I use the excellent GoogleReader): fetching a data feed from a WEB-Service API usually means that no "proper" feed is in place and an RSS item must be created on-the-fly. This is no problem as such but when the RSS aggregator comes fetching updates, the <guid> field isn't updated dynamically by Yahoo! Pipes.

Part of the solution comes from using a mostly undocumented feature of Pipes: the y:id.value item tag.

After fetching the data from the data source, copy a field that can serve as good <guid> into the y:id.value field. In the example above, I used the updated_at field which, of course, isn't a <guid> per-se by not being global ; I'll find a better way next time around.


Finally, before connecting the "pipe output", insert the y:id.value in the pipes results as shown above.

For the interested, here is the pipe's address: Ohloh Project Summary as well as a link to all my pipes.

Have fun with Pipes... I know I do!