Make api adaptor class generic