add setApiUrl method