@4djs/vcloud
v0.1.4
Published
Retrieve the function location from it reference in NodeJS.
Downloads
11
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);
})();