basic wrapper for api calls