How to use API with JavaScript? I have no idea how, HELP!!!