New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@flybywiresim/api-client

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flybywiresim/api-client - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

12

lib/index.d.ts

@@ -86,2 +86,12 @@ export declare class MetarResponse {

}
export declare class PullInfo {
number: number;
title: string;
author: string;
labels: string[];
isDraft: boolean;
}
export declare class ArtifactInfo {
artifactUrl: string;
}
export declare class Paginated<T> {

@@ -144,2 +154,4 @@ results: T[];

static getReleases(user: string, repo: string): Promise<ReleaseInfo[]>;
static getPulls(user: string, repo: string): Promise<PullInfo[]>;
static getArtifact(user: string, repo: string, pull: string): Promise<ArtifactInfo>;
}

@@ -363,4 +363,16 @@ "use strict";

};
GitVersions.getPulls = function (user, repo) {
if (!user || !repo) {
throw new Error("Missing argument");
}
return _get(new URL("/api/v1/git-versions/" + user + "/" + repo + "/pulls", NXApi.url));
};
GitVersions.getArtifact = function (user, repo, pull) {
if (!user || !repo || !pull) {
throw new Error("Missing argument");
}
return _get(new URL("/api/v1/git-versions/" + user + "/" + repo + "/pulls/" + pull + "/artifact", NXApi.url));
};
return GitVersions;
}());
exports.GitVersions = GitVersions;

2

package.json
{
"name": "@flybywiresim/api-client",
"version": "0.8.0",
"version": "0.9.0",
"description": "Client library for the FlyByWire Simulations API",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -229,3 +229,3 @@ # <img src="https://raw.githubusercontent.com/flybywiresim/fbw-branding/master/svg/FBW-Logo.svg" placeholder="FlyByWire" width="400"/>

#### Find a connection by a flight number
#### Find all active connections matching a flight number
```ts

@@ -244,4 +244,2 @@ import { Telex } from '@flybywiresim/api-client';

This will only return an active flight since flight numbers can be reused.
#### Count active connections

@@ -259,4 +257,69 @@ ```ts

### Github
#### Get the newest commit for a branch
```ts
import { GitVersions } from '@flybywiresim/api-client';
GitVersions.getNewestCommit(user, repo, branch)
.then(data => {
console.log(data);
}).catch(err => {
console.error(err);
});
```
- `user` the owner of the repository.
- `repo` the repository.
- `branch` the requested branch.
#### Get all releases for a repository
```ts
import { GitVersions } from '@flybywiresim/api-client';
GitVersions.getReleases(user, repo)
.then(data => {
console.log(data);
}).catch(err => {
console.error(err);
});
```
- `user` the owner of the repository.
- `repo` the repository.
#### Get open pull requests for a repository
```ts
import { GitVersions } from '@flybywiresim/api-client';
GitVersions.getPulls(user, repo)
.then(data => {
console.log(data);
}).catch(err => {
console.error(err);
});
```
- `user` the owner of the repository.
- `repo` the repository.
#### Get the artifact URL for a pull request
```ts
import { GitVersions } from '@flybywiresim/api-client';
GitVersions.getArtifact(user, repo, pull)
.then(data => {
console.log(data);
}).catch(err => {
console.error(err);
});
```
- `user` the owner of the repository.
- `repo` the repository.
- `pull` the number of the pull request.
## License
This software is licensed under the [MIT license](https://github.com/flybywiresim/api-client/blob/main/LICENSE).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc