0.0.7 • Published 5 years ago

invenias v0.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Invenias API

This is an NodeJS/Javascript API wrapper for Invenias X. Be aware that I don't have any official relation towards Invenias. We've created this because to make it way easier to interact with our environment.

If you need any help with this setup. Feel free to reach out to me on my email (below).

Examples

const invenias = require('invenias');

// Set your settings
const auth = {
  companyPath: '', // Path used for your login ex. xxxx.invenias.com (xxx is companyPath)
  clientSecret: '', // Your client secret. You can find this in the sourcecode.
  refreshToken: '', // refreshToken, you can find it in the network tab.
};


// ex. List all people in your organisation.
invenias.people.list(auth, {
  limit: 10,
  skip: 1,
}, (err, data) => {
  console.log(data);
});


// Get details from 1 specific record
invenias.people.detail(auth, '000000-000-000-0000-00000000', (err, data) => {
  if (err) console.log(err);
  console.log('Id: ', data.Id);
  console.log('Name: ', data.NameComponents.FullName);
  console.log('Position: ', data.DefaultPosition.JobTitle);
});


// Create a user
invenias.people.create(auth, {
  NameComponents: {
    FullName: 'Timothy Verhaeghe (TEST)',
  },
  EmailAddresses: [{
    ItemValue: 'me@timothyverhaeghe.com',
    FieldName: 'Email1address',
  }],
  DefaultPosition: {
    JobTitle: 'TEST',
  },
  PhoneNumbers: [{
    ItemValue: '',
    FieldName: 'MobilePhone',
  }],
}, () => {
  console.log('User created');
});

Copyright

Author: Timothy Verhaeghe me@timothyverhaeghe.com

MIT License

Copyright (c) 2018 Timothy Verhaeghe

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago