npm.io
1.1.0 • Published 6 years ago

beacon-sdk-node

Licence
MIT
Version
1.1.0
Deps
2
Size
8 kB
Vulns
1
Weekly
0

Beacon SDK

To install the sdk:

npm install git+ssh://git@gitswarm.f5net.com:f5aas/beacon-sdk-node

Sample usage:

const beacon = require('beacon-sdk-node');

async function createInsight() {
    await beacon.login("your_username", "your_password");

    let myInsight = {
        title:"foo",
        description:"I now have a desc!",
        category:"INS_CAT_COST",
        severity:"INS_SEV_CRITICAL"
    };

    try {
        // This is now NotImplemented as it's using the deprecated imperative api internally
        await beacon.insights.insertOrUpdate(myInsight);
    } catch (e) {
        console.log("Error calling insertOrUpdate: " + e.message)
    }

    console.log(await beacon.insights.list());
}

createInsight();

Keywords