php functions used for working with the pachube.com API