Organizations

Organizations

Get the user organizations

Fliplet.Organizations.get().then(function (organizations) {

});

Get the current organization settings

Fliplet.Organization.Settings.getAll()
  .then(function (settings) {
    // Your code
  });

Extend the current settings

Fliplet.Organization.Settings.set({
  user: 'foo',
  _password: 'bar' // Settings with an underscore prefix "_" will be encrypted
})
  .then(function(settings) {
    // Code to run when it completes
  });

Get a setting

Fliplet.Organization.Settings.get('foo')
  .then(function (value) {
    // Your code
  })

Check if a setting is set

Fliplet.Organization.Settings.isSet('_password')
  .then(function(isSet) {
    if (isSet) {
      // Your code
    }
  });

Unset a setting

Fliplet.Organization.Settings.unset(['user','_password'])
  .then(function (currentSettings) {
    // Your code
  })