added trash() and delete() methods with fallback to RESTful API