Archives Posts
PHP Class for Pownce API (2.0)
March 19th, 2008 by Raj
When you come in to the office on a Monday morning and people ask you “So what did you get up to on the weekend?” I tend to cringe and perhaps quickly think of something a tad less nerdy than tell them the truth, which this weekend happened to be… “Oh, I spent Saturday night writing a better PHP Class for Pownce’s 2.0 API because what was available currently didn’t work the way I wanted it to.”
nerd.
Download the PHP Class file here.
Basic Usage:
// Send a message to public
$pownce = new Pownce(”username”, “password”, “apikey”);
$pownce->postMessage(”public”, “just say hi to everyone”);
$pownce->execute();
Tutorial:
Below is a short screentcast of how to use the class:
Notes:
- When using the “addOption” method if you try to add an option that is not used with the particular API call you’re invoking a string error message will be returned rather than XML or JSON. eg.
$pownce->getPublicNotes();will return
$pownce->addOption(”filter”, “sent”);Invalid option "filter" - The $format argument in most methods is defaulted to xml but can be set to json if you wish
Filed under Tech having 2 Comments »






