Hierarchy

Properties

admin: boolean
roles: SysLink[]
sys: MetaSysProps & {
    space: SysLink;
    user: SysLink;
}
user: SysLink

Methods

  • Deletes this object on the server.

    Returns

    Promise for the deletion. It contains no data, but the Promise error case should be handled.

    Example

    const contentful = require('contentful-management')

    const client = contentful.createClient({
    accessToken: '<content_management_api_key>'
    })

    client.getSpace('<space_id>')
    .then((space) => space.getSpaceMembership('<spaceMembership_id>'))
    .then((spaceMembership) => spaceMembership.delete())
    .then(() => console.log(`spaceMembership deleted.`))
    .catch(console.error)

    Returns Promise<void>

  • Sends an update to the server with any changes made to the object's properties

    Returns

    Object returned from the server with updated changes.

    Example

    const contentful = require('contentful-management')

    const client = contentful.createClient({
    accessToken: '<content_management_api_key>'
    })

    client.getSpace('<space_id>')
    .then((space) => space.getSpaceMembership('<spaceMembership_id>'))
    .then((spaceMembership) => {
    spaceMembership.name = 'new space membership name'
    })
    .then((spaceMembership) => console.log(`spaceMembership ${spaceMembership.sys.id} updated.`))
    .catch(console.error)

    Returns Promise<SpaceMembership>