Space Membership instances
Type Definitions
SpaceMembership #
Properties:
Name | Type | Description |
---|---|---|
sys |
Meta.Sys | System metadata |
name |
string | |
admin |
boolean | User is an admin |
roles |
array | Array of Role Links |
toPlainObject() |
function | Returns this Space Membership as a plain JS object |
- Source:
SpaceMembershipCollection #
Properties:
Name | Type | Description |
---|---|---|
total |
number | |
skip |
number | |
limit |
number | |
items |
Array.<SpaceMembership.SpaceMembership> | |
toPlainObject() |
function | Returns this Space Membership collection as a plain JS object |
- Source:
Methods
(static) delete() → {Promise} #
Deletes this object on the server.
Returns:
Promise for the deletion. It contains no data, but the Promise error case should be handled.
- Type:
- Promise
- Source:
Example
spaceMembership.delete()
.catch(err => console.log(err))
(static) update() → {Promise.<SpaceMembership>} #
Sends an update to the server with any changes made to the object's properties
Returns:
Object returned from the server with updated changes.
- Type:
- Promise.<SpaceMembership>
- Source:
Example
spaceMembership.name = 'New name'
spaceMembership.update()
.then(spaceMembership => console.log(spaceMembership.name))