Skip to content

Commit

Permalink
Final checkin for BBG adapter v2 (#698)
Browse files Browse the repository at this point in the history
* Updated code for the v2 adapter.

* NPM Linting and package-lock update

* Updated to use BBG adapter v2. Final checkin.

---------

Co-authored-by: John <[email protected]>
  • Loading branch information
ameetj85 and johnman authored Mar 28, 2024
1 parent 8e54717 commit 1f2a1ba
Show file tree
Hide file tree
Showing 5 changed files with 1,456 additions and 656 deletions.
2 changes: 1 addition & 1 deletion how-to/integrate-with-bloomberg-basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Pre-requisites

- Bloomberg Terminal software installed, running and with a user logged in. Software can be acquired from here: <https://www.bloomberg.com/professional/support/software-updates/>
- A domain that is set up with Bloomberg IT so that the BBG terminal will accept requests originating from that domain
- An API key provided by Bloomberg. This should be inserted in the place indicated in the file bbgtest.ts
- Please see the documentation online for more information - <https://developers.openfin.co/of-docs/docs/integration-with-terminal-connect>

## Notes about this sample
Expand Down
18 changes: 4 additions & 14 deletions how-to/integrate-with-bloomberg-basic/client/src/bbgtest.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
connect,
enableLogging,
isBloombergTerminalReady,
type BloombergConnection
} from "@openfin/bloomberg";
import { connect, enableLogging, type BloombergConnection } from "@openfin/bloomberg";
import type OpenFin from "@openfin/core";

let bbgConnection: BloombergConnection | undefined;
Expand All @@ -21,6 +16,8 @@ let intentTypeElement: HTMLSelectElement | null;
let intentValueElement: HTMLSelectElement | null;
let logOutput: HTMLPreElement | null;

const API_KEY = "<Please insert your API key here>";

window.addEventListener("DOMContentLoaded", async () => {
// Enable logging in the BBG package
enableLogging();
Expand Down Expand Up @@ -191,14 +188,7 @@ async function connectToBBGTerminal(): Promise<void> {
try {
logInformation("Checking Bloomberg Terminal Status");

if (!(await isBloombergTerminalReady())) {
const error = new Error("Failed to connect to Bloomberg terminal.");
console.log(error);
logInformation("Failed to connect to Bloomberg terminal.");
throw error;
}

bbgConnection = await connect();
bbgConnection = await connect(API_KEY);
logInformation("Connection successful");
} catch (error) {
bbgConnection = undefined;
Expand Down
2 changes: 1 addition & 1 deletion how-to/integrate-with-bloomberg-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "[email protected]",
"license": "SEE LICENSE IN LICENSE.MD",
"dependencies": {
"@openfin/bloomberg": "^1.2.0",
"@openfin/bloomberg": "^2.0.0-beta.10",
"@openfin/core": "34.78.80",
"@openfin/workspace": "17.2.14",
"@openfin/workspace-platform": "17.2.14"
Expand Down
29 changes: 28 additions & 1 deletion how-to/integrate-with-bloomberg-basic/public/manifest.fin.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,38 @@
"icon": "http://localhost:8080/favicon.ico",
"autoShow": false,
"providerUrl": "http://localhost:8080/platform/provider.html",
"preventQuitOnLastWindowClosed": false
"preventQuitOnLastWindowClosed": false,
"permissions": {
"System": {
"launchExternalProcess": true,
"terminateExternalProcess": true,
"downloadAsset": true
}
},
"defaultWindowOptions": {
"permissions": {
"System": {
"launchExternalProcess": true,
"terminateExternalProcess": true,
"downloadAsset": true
}
}
},
"defaultViewOptions": {
"permissions": {
"System": {
"launchExternalProcess": true,
"terminateExternalProcess": true,
"downloadAsset": true
}
}
}
},
"snapshot": {
"windows": [
{
"defaultHeight": 500,
"defaultWidth": 800,
"layout": {
"content": [
{
Expand Down
Loading

0 comments on commit 1f2a1ba

Please sign in to comment.