flightradar24-client-ts
Advanced tools
Comparing version 0.0.4-development to 0.0.5-development
{ | ||
"name": "flightradar24-client-ts", | ||
"version": "0.0.4-development", | ||
"version": "0.0.5-development", | ||
"description": "A client for the Flightradar24 API written in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
118
README.md
@@ -1,72 +0,12 @@ | ||
# FlightRadar24-client-ts | ||
> Template to kickstart creating a Node.js module using TypeScript and VSCode | ||
Inspired by [node-module-boilerplate](https://github.com/sindresorhus/node-module-boilerplate) | ||
## Features | ||
- [Semantic Release](https://github.com/semantic-release/semantic-release) | ||
- [Issue Templates](https://github.com/ryansonshine/FlightRadar24-client-ts/tree/main/.github/ISSUE_TEMPLATE) | ||
- [GitHub Actions](https://github.com/ryansonshine/FlightRadar24-client-ts/tree/main/.github/workflows) | ||
- [Codecov](https://about.codecov.io/) | ||
- [VSCode Launch Configurations](https://github.com/ryansonshine/FlightRadar24-client-ts/blob/main/.vscode/launch.json) | ||
- [TypeScript](https://www.typescriptlang.org/) | ||
- [Husky](https://github.com/typicode/husky) | ||
- [Lint Staged](https://github.com/okonet/lint-staged) | ||
- [Commitizen](https://github.com/search?q=commitizen) | ||
- [Jest](https://jestjs.io/) | ||
- [ESLint](https://eslint.org/) | ||
- [Prettier](https://prettier.io/) | ||
## Getting started | ||
### Set up your repository | ||
# flightradar24-client-ts | ||
**Click the "Use this template" button.** | ||
Alternatively, create a new directory and then run: | ||
```bash | ||
curl -fsSL https://github.com/ryansonshine/FlightRadar24-client-ts/archive/main.tar.gz | tar -xz --strip-components=1 | ||
``` | ||
Replace `FULL_NAME`, `GITHUB_USER`, and `REPO_NAME` in the script below with your own details to personalize your new package: | ||
```bash | ||
FULL_NAME="John Smith" | ||
GITHUB_USER="johnsmith" | ||
REPO_NAME="my-cool-package" | ||
sed -i.mybak "s/\([\/\"]\)(ryansonshine)/$GITHUB_USER/g; s/FlightRadar24-client-ts\|FlightRadar24-client-ts/$REPO_NAME/g; s/Appadoo Apoorva Srinivas/$FULL_NAME/g" package.json package-lock.json README.md | ||
rm *.mybak | ||
``` | ||
### Add NPM Token | ||
Add your npm token to your GitHub repository secrets as `NPM_TOKEN`. | ||
### Add Codecov integration | ||
Enable the Codecov GitHub App [here](https://github.com/apps/codecov). | ||
**Remove everything from here and above** | ||
--- | ||
# FlightRadar24-client-ts | ||
[![npm package][npm-img]][npm-url] | ||
[![Build Status][build-img]][build-url] | ||
[![Downloads][downloads-img]][downloads-url] | ||
[![Issues][issues-img]][issues-url] | ||
[![Code Coverage][codecov-img]][codecov-url] | ||
[![Commitizen Friendly][commitizen-img]][commitizen-url] | ||
[![Semantic Release][semantic-release-img]][semantic-release-url] | ||
> My awesome module | ||
## Install | ||
```bash | ||
npm install FlightRadar24-client-ts | ||
npm install flightradar24-client-ts | ||
``` | ||
@@ -77,42 +17,48 @@ | ||
```ts | ||
import { myPackage } from 'FlightRadar24-client-ts'; | ||
import { FlightRadarApi } from "flightradar24-client-ts"; | ||
myPackage('hello'); | ||
//=> 'hello from my package' | ||
const flightRadarApi = new FlightRadarApi() | ||
// airports | ||
const airports = await api.fetchAirports(); | ||
// airlines | ||
const airlines = await api.fetchAirlines(); | ||
// details of a single flight | ||
const flightDetail = await api.fetchFlight("<flight code (ICAO or IATA)>") | ||
// Radar | ||
// get major zones | ||
const zones = await api.fetchZones(); | ||
// get flights in a zone | ||
const flights = await api.fetchFromRadar({ | ||
zone: zones[0] | ||
}); | ||
// multi-zone flight fetch | ||
const multizoneFlights = await api.fetchFromRadarMultiZone(zones); | ||
``` | ||
## API | ||
[build-img]:https://github.com/ryansonshine/flightradar24-client-ts/actions/workflows/release.yml/badge.svg | ||
### myPackage(input, options?) | ||
[build-url]:https://github.com/ryansonshine/flightradar24-client-ts/actions/workflows/release.yml | ||
#### input | ||
[downloads-img]:https://img.shields.io/npm/dt/flightradar24-client-ts | ||
Type: `string` | ||
[downloads-url]:https://www.npmtrends.com/flightradar24-client-ts | ||
Lorem ipsum. | ||
[npm-img]:https://img.shields.io/npm/v/flightradar24-client-ts | ||
#### options | ||
[npm-url]:https://www.npmjs.com/package/flightradar24-client-ts | ||
Type: `object` | ||
[issues-img]:https://img.shields.io/github/issues/ryansonshine/flightradar24-client-ts | ||
##### postfix | ||
[issues-url]:https://github.com/ryansonshine/flightradar24-client-ts/issues | ||
Type: `string` | ||
Default: `rainbows` | ||
[codecov-img]:https://codecov.io/gh/ryansonshine/flightradar24-client-ts/branch/main/graph/badge.svg | ||
Lorem ipsum. | ||
[codecov-url]:https://codecov.io/gh/ryansonshine/flightradar24-client-ts | ||
[build-img]:https://github.com/ryansonshine/FlightRadar24-client-ts/actions/workflows/release.yml/badge.svg | ||
[build-url]:https://github.com/ryansonshine/FlightRadar24-client-ts/actions/workflows/release.yml | ||
[downloads-img]:https://img.shields.io/npm/dt/FlightRadar24-client-ts | ||
[downloads-url]:https://www.npmtrends.com/FlightRadar24-client-ts | ||
[npm-img]:https://img.shields.io/npm/v/FlightRadar24-client-ts | ||
[npm-url]:https://www.npmjs.com/package/FlightRadar24-client-ts | ||
[issues-img]:https://img.shields.io/github/issues/ryansonshine/FlightRadar24-client-ts | ||
[issues-url]:https://github.com/ryansonshine/FlightRadar24-client-ts/issues | ||
[codecov-img]:https://codecov.io/gh/ryansonshine/FlightRadar24-client-ts/branch/main/graph/badge.svg | ||
[codecov-url]:https://codecov.io/gh/ryansonshine/FlightRadar24-client-ts | ||
[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg | ||
[semantic-release-url]:https://github.com/semantic-release/semantic-release | ||
[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg | ||
[commitizen-url]:http://commitizen.github.io/cz-cli/ |
28256
64