transparency-everywhere / ais-api

AIS API
71 stars 29 forks source link

Added getVesselsInport - Fixed headers #23

Closed andreas-sakellariou closed 3 years ago

andreas-sakellariou commented 3 years ago
  1. It came up that the headers issue had its origin in an incorrect entry: 'User-Agent': 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3703.0 Safari/537.36' After correcting the entry (by removing the substring 'user-agent: '), the headers declaration may be shared by both MT and VF requests. Separate definitions introduced in the previous fix have been removed.

  2. Added the getVesselsInPort function/service call implemented as XMLHttpRequest. The parameter accepted is a port name as displayed in various MT screens. No HTML scraping is needed. It returns a json array identical in content to the one returned by getVesselsInArea. Tried to maintain the existing coding style.

  3. Documentation has been updated as needed