Introducing WPAPI.ORG

Article
18Oct
0

Ok, so I actually launched this last weekend, but I’m only just now getting around to writing (briefly) about it. WPAPI.ORG is a super easy to use API which you can use to retrieve stats for all those great plugins and themes that you’ve got hosted on WordPress.org. Why would you want to do this?

Ok, so I actually launched this last weekend, but I’m only just now getting around to writing (briefly) about it. WPAPI.ORG is a super easy to use API which you can use to retrieve stats for all those great plugins and themes that you’ve got hosted on WordPress.org. Why would you want to do this?

WPapi.org

Why did I build this thing?

Because I could. No, seriously, the reason that I’ve built this (and made it available to everyone else) is that I was looking for ways to pull back the stats from WordPress.org and display them on the project pages here on my site, maybe even with some sexy graphs using something like Raphaël JS. After some investigation I found the xml feed that powers the graphs on WordPress.org, but that didn’t really help me. What I really wanted was JSON.

How’s it work?

Well it uses the previously mention xml feed from WordPress.org and caches that on my server, then depending on the URL you request it returns either xml, json, jsonp (with custom callback), serialised php string or csv. For example, together with jQuery you could use the jsonp format to do something cool (like graphs)…

$.getJSON("http://wpapi.org/api/plugin/fluency-admin.jsonp?callback=?", function(data){
  $.each(data.stats, function(date,downloads){
    // do something cool here...
  });
});

For more info on the different output formats along with some examples of the responses you can expect from each head over to WPAPI.ORG

WPapi.org homepage

Please leave your name and email, so we can show off your gravatar


No Comments on this

deanjrobinson.com
twitter was not updated. | tumblr was not updated. | lastfm was not updated. |