vat-data

VATData Handle for pulling info

Usage no npm install needed!

<script type="module">
  import vatData from 'https://cdn.skypack.dev/vat-data';
</script>

README

VAT-DATA

NPM Package that you can use to pull data from raw VATSIM API Endpoints with ease.

Installation

Install the package via: npm i vat-data And this should install package without any errors

Example

Here is an example of using the VAT-DATA package.

const  Handler  =  require('vat-data')

const  client  =  new  Handler();

client.getRecentConnection('1475111').then(connection  => {
const  ID  =  connection.id; //int: flight id on the network
const  vatID  =  connection.vatsim_id; //string: cid
const  connectionType  =  connection.type; //int: Referring to Pilot: 1 or ATC: 2
const  connectionRating  =  connection.rating; //Referring to Pilot/Observer, S1 etc but as integers.
const  connectionCallsign  =  connection.callsign  //string: flight callsign

console.log(connection);

});

This is a basic example of pulling the most recent VATSIM Client connection from a user. This is a pretty new endpoint aswell.