Finished the js api base class