A generic RESTful API wrapper