How To Use An Api In Javascript