1.1.3 • Published 3 years ago

@navigraph/downloader v1.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

navigraph-downloader

Downloader helper that download files with concurrency and handles network problems gracefully

Example implementation

import Downloader from "./downloader";

Downloader.download({
  files: [
    {
      url: "https://www.aviationweather.gov/adds/dataserver_current/current/metars.cache.csv",
      path: "data/",
      type: "METAR",
    },
    {
      url: "https://www.aviationweather.gov/adds/dataserver_current/current/tafs.cache.csv",
      path: "data/",
      type: "TAF",
    },
    {
      url: "https://www.aviationweather.gov/adds/dataserver_current/current/airsigmets.cache.csv",
      path: "data/",
      type: "SIGMET",
    },
  ],
  retries: 3,
  concurrency: 50,
  backoff: 100,
})
  .then((downloadedFiles) => {
    console.log(downloadedFiles);
  })
  .catch((error) => {
    console.log(error.message);
  });
1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago