ZooPHP – a PHP wrapper for Zootool

I’ve been using Zootool more and more recently to bookmark things I see on the web. The visual representation of saved items works better for me than Delicious and browser bookmarks are a non-starter these days.

Since the news of an API last week, I’ve been working on a little class wrapper – partly to hone my OOP skills and partly to support some great work by Bastian – and my class is now ready. I’ve named it ZooPHP.

$zoo = new ZooPHP($key, $secret);
$zoo->getPopularItems();

To start using ZooPHP, you’ll need a Zootool API key. The script is released under a BSD license and is documented, but should be fairly self-explanatory:

$zoo->setAuth('username', 'password');
$zoo->setFormat('array');
$zoo->getUser('bastian');
$zoo->getUserFriends('bastian');
$zoo->getUserFollowers('bastian');
$zoo->getUserItems('bastian');
$zoo->getLatestItems();
$zoo->getItem('iw6og3');
$zoo->getPopularItems();
$zoo->addItem('adamhopkinson.co.uk', 'adamhopkinson.co.uk', 'zoophp, php, wrapper');

You’ll only need to call setAuth if you want to add items or return private items with getItems.

Click here to download your copy of ZooPHP ยป

This entry was posted in code, development and tagged , . Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>