Skip to content

Commit

Permalink
minor tweaks πŸ“πŸ’š; 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Jul 7, 2023
1 parent 609dda6 commit 65da938
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install

- run: npm run lint
Expand Down
5 changes: 4 additions & 1 deletion lib/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ const fetchFromRadar = async (north, west, south, east, when, opt = {}) => {
if ('number' !== typeof south) throw new TypeError('south must be a number')
if ('number' !== typeof east) throw new TypeError('east must be a number')
if (when && 'number' !== typeof when) throw new TypeError('when must be a number')
opt = Object.assign({}, defaults, opt)
opt = {
...defaults,
...opt,
}

const query = {
bounds: [north, south, west, east].join(','),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flightradar24-client",
"description": "Fetch aircraft data from Flightradar24.",
"version": "0.3.1",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"files": [
Expand Down
13 changes: 6 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
**Fetch aircraft data from [Flightradar24](https://www.flightradar24.com/).** Inofficial.

[![npm version](https://img.shields.io/npm/v/flightradar24-client.svg)](https://www.npmjs.com/package/flightradar24-client)
[![build status](https://img.shields.io/travis/derhuerst/flightradar24-client.svg?branch=master)](https://travis-ci.org/derhuerst/flightradar24-client)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/flightradar24-client.svg)
![minimum Node.js version](https://img.shields.io/node/v/flightradar24-client.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)
[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)
[![support me via GitHub Sponsors](https://img.shields.io/badge/support%20me-donate-fa7664.svg)](https://github.com/sponsors/derhuerst)
[![chat with me on Twitter](https://img.shields.io/badge/chat%20with%20me-on%20Twitter-1da1f2.svg)](https://twitter.com/derhuerst)


## Installing
Expand Down Expand Up @@ -59,7 +58,7 @@ console.log(flights)
radar: 'T-EDDT1', // F24 "radar" data source ID
isGlider: false,

timestamp: 1520538174
timestamp: 1520538174,
}
// …
]
Expand Down Expand Up @@ -89,14 +88,14 @@ console.log(flight)
name: 'Berlin Tegel Airport',
coordinates: {latitude: 52.560001, longitude: 13.288, altitude: 122},
timezone: 'Europe/Berlin',
country: 'DEU'
country: 'DEU',
},
destination: {
id: 'GOT',
name: 'Gothenburg Landvetter Airport',
coordinates: {latitude: 57.66283, longitude: 12.27981, altitude: 506},
timezone: 'Europe/Stockholm',
country: 'SWE'
country: 'SWE',
},
departure: '2017-07-22T17:15:00+02:00',
scheduledDeparture: '2017-07-22T17:15:00+02:00',
Expand All @@ -106,7 +105,7 @@ console.log(flight)
scheduledArrival: '2017-07-22T18:35:00+02:00',
arrivalTerminal: null,
arrivalGate: '19A',
delay: 1757
delay: 1757,
}
```

Expand Down

0 comments on commit 65da938

Please sign in to comment.