cotrip-feed

Programmatic interface to the cotrip.org XML data feeds

Usage no npm install needed!

<script type="module">
  import cotripFeed from 'https://cdn.skypack.dev/cotrip-feed';
</script>

README

cotrip-feed

This module provides a lightweight programmatic interface to the cotrip.org XML data feeds. It pulls the XML data and converts it into a JavaScript object.

Usage

First, sign up for an API key on the COtrip website.

// Initialize the feed with your COtrip API key
const feed = require('cotrip-feed')({
  apiKey: 'YOUR_API_KEY'
});

// Print all alerts
feed.alerts(alerts => {
  console.log(alerts);
});

Resources