Mixing Pipes and Plazes

I keep meaning to write a more detailed post about the changes that have been going on at Plazes, but in the meantime here’s a little doobrey I hacked up the other day.

Plazes now has a REST API (the old, pre-Activities version used to have an XML-RPC API). However, the information it provides is sometimes a little verbose for my purposes… I’d quite like to be able to simply ask the Plazes server “where am i?” and be told in a really simple format. Right now it looks like I need to know my user ID, and then go get http://plazes.com/users/<id>/activity.xml, and then get the name of the <plaze> element from the verbose XML that is returned. Something that just returned my current Plaze would be neater (for things like the ecto Applescript that I based off of Peter Rukavina’s Adium Applescript of days gone by, which used the old WhereAmI API).

So I turned to Yahoo! Pipes to see how I could abbreviate the output. I’ve created a simple Pipe which can return a small piece of JSON containing a user’s location when a user id (short name or number) is provided.

The base Pipe is here. It is not very useful in raw form as Pipes returns RSS by default, so running it will result in an apparently empty result on the web page. Try the JSON option instead.

You can add a user parameter (it defaults to my ID number, 6032), e.g. http://pipes.yahoo.com/pipes/pipe.run?_id=ZCgigzK93BGPeu60ouNLYQ&user=6032&_render=json

Running this query results in a JSON collection containing something like:

      "user":"Andy Piper",
      "plaze":"Andy's Office",

Annoyingly, Pipes only allows me to publish JSON or RSS (I’d prefer just simple text, but hey-ho).

Something more I’d like to do with this is to use Project Zero instead of Pipes, and make it more configurable to enable me to get more information on the user and plaze if needed.

4 thoughts on “Mixing Pipes and Plazes”

  1. The closest you will get to plain text is csv output. Change the value of the _render parameter to “csv”.

  2. I’d like to be able to get Plazes to somehow give me a geo-rss feed. So far I haven’t been able to figure out how to get this. 🙁

    1. Good luck with that – is Plazes even still a going concern? Since they were bought by Nokia I’m not sure what is going on there.

Leave a Reply