Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Callsign.js Docs

Callsign.js Docs

getAmateurRadioInfoByCallsign

Search DXCC information for amateur radio callsign getAmateurRadioInfoByCallsign('aa1aa')

return info

// {
//     "prefix": "4S", //callsign prefix
//     "area": "Sri Lanka", //callsign DXCC name
//     "areacn": "斯里兰卡", //callsign Chinese DXCC name
//     "areacode": "LK" // callsign DXCC ISO3166 code
// },
asyncGetAmateurRadioDetailedByCallsign (browser noly) || getAmateurRadioDetailedByCallsign (Node.js noly)

Get the detailed data of the call sign

asyncGetAmateurRadioDetailedByCallsign(callsign,url) Url is the address where the full information JSON is stored. default is https://unpkg.com/callsign/dist/data/cty.json

getAmateurRadioDetailedByCallsign(callsign)

You can use the tools in the tools directory to customize your data with CTY.csv.

// browser
callsign.asyncGetAmateurRadioDetailedByCallsign('ba1aa').then(res => {
  console.log(res)
})

// Node.js
callsign.getAmateurRadioDetailedByCallsign('BA1AA')

// {
//     "prefix": "CE",
//     "areaname": "Chile",
//     "cqzone": "12",
//     "ituzone": "14",
//     "timezone": "4.0",
//     "areacode": "CL",
//     "areacn": "智利"
// },
getAircraftRegistInfoByTailCode

Inquire about the registered place of the aircraft based on the aircraft tail number

getAircraftRegistInfoByTailCode(tailcode)

You can use the npm run uploaddata:aircraftDB command to call the web crawler in the tools folder to update the data.

callsign.getAircraftRegistInfoByTailCode('B-HVP')
callsign.getAircraftRegistInfoByTailCode('RA-12345')

// {
//   area: 'Russian Federation',
//   prefix: 'RA'
// }
asyncGetAirlineInfoByFlightNumber (browser noly) || getAirlineInfoByFlightNumber (Node.js noly)

Get airline information based on flight number

asyncGetAirlineInfoByFlightNumber(flightnumber, url) Url is the address where the full information JSON is stored. default is https://unpkg.com/callsign/dist/data/arelineDB.json

You can call the crawler in the tools folder to update the data and store it on your own server.

getAirlineInfoByFlightNumber(flightnumber)

callsign.asyncGetAirlineInfoByFlightNumber('CES7199').then(res => {
  console.log(res)
})

callsign.getAirlineInfoByFlightNumber('NH17')

// {
//   IATA: 'MU',
//   ICAO: 'CES',
//   name: 'China Eastern Airlines',
//   callsign: 'CHINA EASTERN',
//   area: 'China'
// }