TeamMembershipClient
public class TeamMembershipClient
An iOS client wrapper of the Cisco Webex TeamMemberships REST API .
Since
1.2.0-
Lists all team memberships where the authenticated user belongs.
Since
1.2.0Declaration
Swift
public func list(teamId: String, max: Int? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<[TeamMembership]>) -> Void)Parameters
teamIdLimit results to a specific team, by ID. (Derived parameter: Use
TeamClient.list(...)to get a list of teams. Then useTeam.idto retrieve the teamId)maxThe maximum number of team memberships in the response.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Adds a person to a team by person id; optionally making the person a moderator of the team.
Since
1.2.0Declaration
Swift
public func create(teamId: String, personId: String, isModerator: Bool = false, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<TeamMembership>) -> Void)Parameters
teamIdThe identifier of the team. (Derived parameter: Use
TeamClient.list(...)to get a list of teams. Then useTeam.idto retrieve the teamId)personIdThe identifier of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personIdto get the personId of the member)isModeratorIf true, make the person a moderator of the team. The default is false.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
TeamMembership
-
Add a person to a teams by email address; optionally making the person a moderator of the team.
Since
1.2.0Declaration
Swift
public func create(teamId: String, personEmail: EmailAddress, isModerator: Bool = false, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<TeamMembership>) -> Void)Parameters
teamIdThe identifier of the team. (Derived parameter: Use
TeamClient.list(...)to get a list of teams. Then useTeam.idto retrieve the teamId)personEmailThe email address of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personEmailto get the email address of the member)isModeratorIf true, make the person a moderator of the team. The default is false.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Retrieves the details for a membership by id.
Since
1.2.0Declaration
Swift
public func get(membershipId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<TeamMembership>) -> Void)Parameters
membershipIdThe identifier of the membership. (Derived parameter: Use
TeamMembershipClient.list(...)to get the list of team memberships. Then useTeamMembership.idto retrieve the membershipId)queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Updates the details for a membership by id.
Since
1.2.0Declaration
Swift
public func update(membershipId: String, isModerator: Bool, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<TeamMembership>) -> Void)Parameters
membershipIdThe identifier of the membership. (Derived parameter: Use
TeamMembershipClient.list(...)to get the list of team memberships. Then useTeamMembership.idto retrieve the membershipId)isModeratorIf true, make the person a moderator of the team. The default is false.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Deletes a membership by id.
Since
1.2.0Declaration
Swift
public func delete(membershipId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Void>) -> Void)Parameters
membershipIdThe identifier of the membership. (Derived parameter: Use
TeamMembershipClient.list(...)to get the list of team memberships. Then useTeamMembership.idto retrieve the membershipId)queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
View on GitHub