@4djs/vcloud

Retrieve the function location from it reference in NodeJS.

Usage no npm install needed!

<script type="module">
  import 4djsVcloud from 'https://cdn.skypack.dev/@4djs/vcloud';
</script>

README

Example

const { Client } = require('@4djs/vcloud');

(async () => {
  const c = new Client({
    url: 'https://mycloud.vmware.com',
    org: 'MyOrg',
    user: 'admin',
    pass: 'P@$w0Rd',
  });

  // Optional: Initialize the token
  c.setToken({
    'token': 'TOKEN_HERE',
    'type': 'Bearer',
  });

  const session = await c.session.getCurrent();
  console.log(session.roles);
  const orgs = await c.org.getCurrent();
  console.log(orgs);
  const [{ id }] = orgs;
  console.log(id);
  const org = await c.org.getById(id);
  console.log(org);
})();