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.