- Source:
Team instances
Type Definitions
Team
- Source:
Properties:
Name | Type | Description |
---|---|---|
sys |
Meta.Sys | System metadata |
name |
string | |
description |
string | |
toPlainObject() |
function | Returns this Team as a plain JS object |
TeamCollection
- Source:
Properties:
Name | Type | Description |
---|---|---|
total |
number | |
limit |
number | |
skip |
number | |
sys |
Object.<{type: "Array"}> | |
items |
Array.<Team.Team> | |
toPlainObject() |
function | Returns the collection as a plain JS object |
Methods
(static) delete() → {Promise}
- Source:
Deletes this object on the server.
Example
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getOrganization('organization_id')
.then(org => org.getOrganizationMembership('organizationMembership_id'))
.then((team) => {
team.delete();
})
.catch(console.error)
Returns:
Promise for the deletion. It contains no data, but the Promise error case should be handled.
- Type
- Promise
(static) update() → {Promise.<Team>}
- Source:
Sends an update to the server with any changes made to the object's properties
Example
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getOrganization('organization_id')
.then(org => org.getTeam('team_id'))
.then((team) => {
team.description = 'new description';
team.update();
})
.catch(console.error)
Returns:
Object returned from the server with updated changes.
- Type
- Promise.<Team>