TeamMembershipClient

public class TeamMembershipClient

An iOS client wrapper of the Cisco Spark TeamMemberships REST API .

Since

1.2.0
  • Lists all team memberships where the authenticated user belongs.

    Since

    1.2.0

    Declaration

    Swift

    public func list(teamId: String, max: Int? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<[TeamMembership]>) -> Void)

    Parameters

    teamId

    Limit results to a specific team, by ID.

    max

    The maximum number of team memberships in the response.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A 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.0

    Declaration

    Swift

    public func create(teamId: String, personId: String, isModerator: Bool = false, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<TeamMembership>) -> Void)

    Parameters

    teamId

    The identifier of the team.

    personId

    The identifier of the person.

    isModerator

    If true, make the person a moderator of the team. The default is false.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A 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.0

    Declaration

    Swift

    public func create(teamId: String, personEmail: EmailAddress, isModerator: Bool = false, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<TeamMembership>) -> Void)

    Parameters

    teamId

    The identifier of the team.

    personEmail

    The email address of the person.

    isModerator

    If true, make the person a moderator of the team. The default is false.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Retrieves the details for a membership by id.

    Since

    1.2.0

    Declaration

    Swift

    public func get(membershipId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<TeamMembership>) -> Void)

    Parameters

    membershipId

    The identifier of the membership.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Updates the details for a membership by id.

    Since

    1.2.0

    Declaration

    Swift

    public func update(membershipId: String, isModerator: Bool, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<TeamMembership>) -> Void)

    Parameters

    membershipId

    The identifier of the membership.

    isModerator

    If true, make the person a moderator of the team. The default is false.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Deletes a membership by id.

    Since

    1.2.0

    Declaration

    Swift

    public func delete(membershipId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Any>) -> Void)

    Parameters

    membershipId

    The identifier of the membership.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void