Giter VIP home page Giter VIP logo

mamori-ent-js-sdk's Introduction

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,io_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 io_datasource.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

mamori-ent-js-sdk's People

Contributors

omasri avatar dparnell avatar pmaher-mamori-io avatar omarmamori avatar beachbrunet avatar ldabreo-mamori avatar

Watchers

 avatar

Forkers

plloi beachbrunet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.