MembershipClient

public class MembershipClient

An iOS client wrapper of the Cisco Spark Room Memberships REST API .

Since

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

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    max

    The maximum number of items in the response.

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Lists all memberships in the given room by room Id.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    roomId

    The identifier of the room where the membership belongs.

    max

    The maximum number of memberships in the response.

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Lists any room memberships for the given room (by room id) and person (by person id).

    Since

    1.2.0

    Declaration

    Swift

    public func list(roomId: String, personId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<[Membership]>) -> Void)

    Parameters

    roomId

    The identifier of the room where the memberships belong.

    personId

    The identifier of the person who has the memberships.

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Lists any room memberships for the given room (by room id) and person (by email address).

    Since

    1.2.0

    Declaration

    Swift

    public func list(roomId: String, personEmail: EmailAddress, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<[Membership]>) -> Void)

    Parameters

    roomId

    The identifier of the room where the memberships belong.

    personEmail

    The email address of the person who has the memberships.

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Adds a person to a room by person id; optionally making the person a moderator.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    roomId

    The identifier of the room where the person is to be added.

    personId

    The identifier of the person to be added.

    isModerator

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

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Adds a person to a room by email address; optionally making the person a moderator.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    roomId

    The identifier of the room where the person is to be added.

    personEmail

    The email address of the person to be added.

    isModerator

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

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Retrieves the details for a membership by membership id.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    membershipId

    The identifier of the membership.

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Updates the properties of a membership by membership id.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    membershipId

    The identifier of the membership.

    isModerator

    If true, make the person a moderator of the room in this membership. The default is false.

    queue

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Deletes a membership by membership id. It removes the person from the room where the membership belongs.

    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

    If not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void