@flybywiresim/api-client
Advanced tools
Comparing version 0.13.0 to 0.14.0
@@ -99,2 +99,3 @@ export declare class MetarResponse { | ||
sha: string; | ||
shortSha: string; | ||
timestamp: Date; | ||
@@ -131,2 +132,21 @@ } | ||
} | ||
export declare class GNSSResponse { | ||
name: string; | ||
id: string; | ||
epoch: Date; | ||
meanMotion: number; | ||
eccentricity: number; | ||
inclination: number; | ||
raOfAscNode: number; | ||
argOfPericenter: number; | ||
meanAnomaly: number; | ||
ephemerisType: number; | ||
classificationType: string; | ||
noradCatId: number; | ||
elementSetNo: number; | ||
revAtEpoch: number; | ||
bstar: number; | ||
meanMotionDot: number; | ||
meanMotionDdot: number; | ||
} | ||
export declare class Paginated<T> { | ||
@@ -198,1 +218,5 @@ results: T[]; | ||
} | ||
export declare class GNSS { | ||
static get(): Promise<GNSSResponse[]>; | ||
private static mapResult; | ||
} |
@@ -63,3 +63,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Charts = exports.GitVersions = exports.ATC = exports.Airport = exports.Telex = exports.Taf = exports.Atis = exports.Metar = exports.NXApi = exports.TelexNotConnectedError = exports.HttpError = exports.AtcType = void 0; | ||
exports.GNSS = exports.Charts = exports.GitVersions = exports.ATC = exports.Airport = exports.Telex = exports.Taf = exports.Atis = exports.Metar = exports.NXApi = exports.TelexNotConnectedError = exports.HttpError = exports.AtcType = void 0; | ||
var AtcType; | ||
@@ -413,1 +413,15 @@ (function (AtcType) { | ||
exports.Charts = Charts; | ||
var GNSS = /** @class */ (function () { | ||
function GNSS() { | ||
} | ||
GNSS.get = function () { | ||
var url = new URL("/api/v1/gnss", NXApi.url); | ||
return _get(url) | ||
.then(function (res) { return res.map(GNSS.mapResult); }); | ||
}; | ||
GNSS.mapResult = function (response) { | ||
return __assign(__assign({}, response), { epoch: new Date(response.epoch) }); | ||
}; | ||
return GNSS; | ||
}()); | ||
exports.GNSS = GNSS; |
{ | ||
"name": "@flybywiresim/api-client", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"description": "Client library for the FlyByWire Simulations API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -94,4 +94,6 @@ # <img src="https://raw.githubusercontent.com/flybywiresim/fbw-branding/master/svg/FBW-Logo.svg" placeholder="FlyByWire" width="400"/> | ||
- `icao` is a string of the the airport ICAO code to search for. | ||
### Airport | ||
### ATC | ||
```ts | ||
@@ -113,3 +115,2 @@ import { Atis } from '@flybywiresim/api-client'; | ||
- `icao` is a string of the the airport ICAO code to search for. | ||
@@ -339,2 +340,5 @@ ### TELEX connection handling | ||
### Charts | ||
#### Get the charts for an airport | ||
@@ -352,5 +356,23 @@ ```ts | ||
- `icao` is a string of the the airport ICAO code to search for. | ||
### GNSS | ||
#### Fetch data for all GNSS satellites | ||
```ts | ||
import { Atis } from '@flybywiresim/api-client'; | ||
GNSS.get() | ||
.then(data => { | ||
console.log(data); | ||
}).catch(err => { | ||
console.error(err); | ||
}); | ||
``` | ||
## License | ||
This software is licensed under the [MIT license](https://github.com/flybywiresim/api-client/blob/main/LICENSE). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31756
644
375