UNPKG

vat-data

Version:

VATData Handle for pulling info

32 lines (21 loc) 982 B
# 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. ```js 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.