vat-data
v1.0.6
Published
VATData Handle for pulling info
Downloads
4
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.