Neolithic Prancing Minotaurs

    mamori-ent-js-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.1 • Public • Published

    SDK for Mamori enterprise server and proxies

    Installation

    yarn add mamori-ent-js-sdk
    yarn add ts-node
    yarn add typescript
    yarn add @types/node
    yarn add @types/minimist
    

    Usage

    To run a script:

    yarn ts-node <your script>

    Example script: login and list available datasources

    // allow for self-signed certificates
    process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
    
    import { MamoriService } from 'mamori-ent-js-sdk';
    import { Datasource } from 'mamori-ent-js-sdk';
    
    let mamoriUrl  = "https://localhost/" ;
    let mamoriUser = "alice" ;
    let mamoriPwd  = "mirror" ;
    
    let dm = new MamoriService(mamoriUrl);
    
    async function display_datasources() {
      let api = new MamoriService(mamoriUrl);
    
      console.info("Connecting...");
      let login = await api.login(mamoriUser, mamoriPwd);
      console.info("Login successful for: ", login.fullname, ", session: ", login.session_id);
    
      console.info("Fetching user datasources...");
      let datasources = await Datasource.getAll(api);
      console.info("User datasources: ", datasources);
    }
    
    display_datasources()
      .catch(e => console.error("ERROR: ", e))
      .finally(() => process.exit(0));

    For more examples, see ./examples/.

    For several useful one-task scripts, see ./scripts/.

    Documentation

    To generate, execute ./generate_docs.sh and open ./docs/index.html to view.

    See mamori.io for further documentation.


    Copyright (c) 2021 mamori.io

    Keywords

    none

    Install

    npm i mamori-ent-js-sdk

    DownloadsWeekly Downloads

    3

    Version

    1.1.1

    License

    Apache-2.0

    Unpacked Size

    2.27 MB

    Total Files

    140

    Last publish

    Collaborators

    • dparnell_mamori
    • omasri