Javascript adapter library for accessing APIs