This package has been deprecated

Author message:

Whazzup feed as a text file has been decommissioned on March 1st, 2022. With the release of new IVAO API, there's now a JSON feed available for developers. You can see more information regarding this at https://whazzup.ivao.aero/.

ivao-whazzup
TypeScript icon, indicating that this package has built-in type declarations

3.1.1 • Public • Published

ivao-whazzup

npm version License: MIT CI Codebeat Coverage Status semantic-release

A simple library for retrieving IVAO Whazzup data.

Installation

npm install ivao-whazzup
yarn add ivao-whazzup

Usage

Before you begin, you must first build the object. This is done by using the provided builder.

import IvaoWhazzup from 'ivao-whazzup';

const ivaoWhazzupBuilder = IvaoWhazzup.makeBuilder();
const ivaoWhazzup = ivaoWhazzupBuilder.build();

After that, you're good to go, and all you need to do is call the function fetchData() which will restore data from the IVAO Whazzup file.

import IvaoWhazzup from 'ivao-whazzup';

const ivaoWhazzupBuilder = IvaoWhazzup.makeBuilder();
const ivaoWhazzup = ivaoWhazzupBuilder.build();
ivaoWhazzup.fetchData().then(console.log).catch(console.error);

Customizing the File Contents Provider

By default this library will retrieve the Whazzup File hosted at IVAO API: https://api.ivao.aero/getdata/whazzup/whazzup.txt. However, for some reason, you might need to use another implementation, e.g.: retrieving contents from file system.

In order to do that IvaoWhazzupBuilder exposes overridingFileContentsProvider method, which allows you to easily switch your provider to another implementation of FileContentsProvider interface. So, supposing you have the following implementation:

class MyFileContentsProvider implements FileContentsProvider {
  public getFileLines(): Promise<string[]> {
    // Here I do my specific logic to retrieve file contents
  }
}

And then, do:

import IvaoWhazzup from 'ivao-whazzup';

const ivaoWhazzupBuilder = IvaoWhazzup.makeBuilder();
const ivaoWhazzup = ivaoWhazzupBuilder.overridingFileContentsProvider(new MyFileContentsProvider()).build();
ivaoWhazzup.fetchData().then(console.log).catch(console.error);

Use terms

Refer to IVAO Regulations D.4

D.4 Whazzup usage (live network data)

  1. Whazzup is not any longer subject for an approval issued by DEVOPs. Whazzup feed is free to use for everyone.
  2. Whazzup feed is provided as plain text file.
  3. To reduce data load, this file is served as gzip-compressed archive and must be handled on the users end accordingly.
  4. The maximum refresh time of the Whazzup feed is once per 3 minutes.
  5. If DEVOPs detects a refresh rate shorter than 3 minutes, DEVOPs reserves the right to ban the source IP address requesting Whazzup feed temporarily or permanently.

Readme

Keywords

none

Package Sidebar

Install

npm i ivao-whazzup

Weekly Downloads

1

Version

3.1.1

License

MIT

Unpacked Size

88.8 kB

Total Files

126

Last publish

Collaborators

  • jpedroh