API Adapater for Javascript