angularjs service for xively REST API