wxc_sdk.team_memberships package

class wxc_sdk.team_memberships.TeamMembership(*, id: str | None = None, teamId: str | None = None, personId: str | None = None, personEmail: str | None = None, personDisplayName: str | None = None, personOrgId: str | None = None, isModerator: bool | None = None, created: datetime | None = None)[source]

Bases: ApiModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

id: str | None

A unique identifier for the team membership.

team_id: str | None

The team ID.

person_id: str | None

The person ID.

person_email: str | None

The email address of the person.

person_display_name: str | None

The display name of the person.

person_org_id: str | None

The organization ID of the person.

is_moderator: bool | None

Whether or not the participant is a team moderator.

created: datetime | None

The date and time when the team membership was created.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'use_enum_values': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'created': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='created', alias_priority=1), 'id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='id', alias_priority=1), 'is_moderator': FieldInfo(annotation=Union[bool, NoneType], required=False, alias='isModerator', alias_priority=1), 'person_display_name': FieldInfo(annotation=Union[str, NoneType], required=False, alias='personDisplayName', alias_priority=1), 'person_email': FieldInfo(annotation=Union[str, NoneType], required=False, alias='personEmail', alias_priority=1), 'person_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='personId', alias_priority=1), 'person_org_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='personOrgId', alias_priority=1), 'team_id': FieldInfo(annotation=Union[str, NoneType], required=False, alias='teamId', alias_priority=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class wxc_sdk.team_memberships.TeamMembershipsApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

Team Memberships represent a person’s relationship to a team. Use this API to list members of any team that you’re in or create memberships to invite someone to a team. Team memberships can also be updated to make someone a moderator or deleted to remove them from the team. Just like in the Webex app, you must be a member of the team in order to list its memberships or invite people.

list(team_id: str, **params) Generator[TeamMembership, None, None][source]

Lists all team memberships for a given team, specified by the teamId query parameter. Use query parameters to filter the response.

Parameters:

team_id (str) – List memberships for a team, by ID.

create(team_id: str, person_id: str | None = None, person_email: str | None = None, is_moderator: bool | None = None) TeamMembership[source]

Add someone to a team by Person ID or email address, optionally making them a moderator.

Parameters:
  • team_id (str) – The team ID.

  • person_id (str) – The person ID.

  • person_email (str) – The email address of the person.

  • is_moderator (bool) – Whether or not the participant is a team moderator.

details(membership_id: str) TeamMembership[source]

Shows details for a team membership, by ID. Specify the team membership ID in the membershipId URI parameter.

Parameters:

membership_id (str) – The unique identifier for the team membership.

membership(membership_id: str, is_moderator: bool) TeamMembership[source]

Updates a team membership, by ID. Specify the team membership ID in the membershipId URI parameter.

Parameters:
  • membership_id (str) – The unique identifier for the team membership.

  • is_moderator (bool) – Whether or not the participant is a team moderator.

delete(membership_id: str)[source]

Deletes a team membership, by ID. Specify the team membership ID in the membershipId URI parameter. The team membership for the last moderator of a team may not be deleted; promote another user to team moderator first.

Parameters:

membership_id (str) – The unique identifier for the team membership.

base = 'team/memberships'
session: RestSession

REST session