Advertisement
grantabc99

Untitled

Feb 18th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. const stationurl = 'https://ptx.transportdata.tw/MOTC/v2/Bike/Station/Tainan?$format=JSON';
  2. const amounturl = 'https://ptx.transportdata.tw/MOTC/v2/Bike/Availability/Tainan?$format=JSON';
  3.  
  4. const amountdata=fetch(amounturl)
  5. .then(res => res.json())
  6. .catch(err => console.log('error'));
  7. const stationinfo=fetch(stationurl)
  8. .then(res => res.json())
  9. .catch(err =>console.log('error'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement