A general wrapper to work with any API