Using Yahoo! Pipes: Your Most Recent Nike+ Run in Friendfeed

During the last few weeks, I’ve built a couple of pipes I want to share. (“Pipe”, in this context, means an application built in Yahoo! Pipes.)

Here’s one of them.

Your Most Recent Nike+ Run

As I’ve mentioned once or twice in the past, I’ve become a more or less avid runner during the last year. One central piece of my equipment is my Nike+. I don’t run without it. I am a geek, I love numbers. The Nike+ provides me with numbers. It makes running a game.

I sync my iPod with my iTunes after each run, and the Nike site is taking the raw data, crunching it, giving me graphs and more numbers, and (this is the interesting thing) badges for my website.

Now, I don’t really care about those. But when there are badges, there must be an API which provides the raw data to them. Looking behind the scenes, I quickly found it. It’s not password-protected or secured in any way; when you set your nikeplus.nike.com profile to “public”, the API will return some of your data (run overviews, run details etc. – no personal details).

So, knowing the API URL, I’ve built a pipe which will do a few things:

  1. Accept any nikeplus.nike.com “brag”-type of link as parameter (when you’re logged in to the site, these are usually labelled “Share with your friends”, “Grab the link” etc.).
  2. It will extract your public, numeric runner ID from this link.
  3. It’ll fetch the data for the most recent run of the runner with this ID, i.e. you.
  4. It’ll build an RSS feed with the data of your most recent run.

When writing the pipe, I’ve made a few assumptions, namely that…

  • you sync your iPod after each run
  • you’re using the Nike+ site
  • you don’t run more than once per day.

Since I am lazy, I’ll only use the data for the most recent run, so the pipe’s results will be exactly that – just a single item, your most recent run.

That being said, I found this sufficient. After adding the pipe’s RSS URL as new “Custom RSS”-type service to Friendfeed, FF will effectively trigger the pipe a few times each day, and your latest run will be added to your stream quickly. Next time you sync your iPod, the Nike site will pick up the new data, the API will return the new data to the pipe, and the new run will be added as new Friendfeed item.

The pipe will post your runs in the following format: “[Nike+ runner name] ran [distance] [km/mi] in [time]”, for example “3R ran 11.3543 km in 1:03'54"”. The message will link to the public page of the run – a page like this. (3R is my Nike+ moniker.)

Now, why would I want to add my runs to Friendfeed? Well, why not? For me, running is a nice part of my life. I’m actually enjoying it, I’m keeping it casual, and I am proud of every damn kilometer mark I pass. Plus, as mentioned, I am a geek, and I like to share what I build. :)

If you have questions or suggestions, speak your mind in the comments.

💬 Reply by email     ⭐️ Also on micro.blog
Carlo Zottmann @czottmann