RoomClient

public class RoomClient

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

Since

1.2.0
  • Lists all rooms where the authenticated user belongs.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    teamId

    If not nil, only list the rooms that are associated with the team by team id.

    max

    The maximum number of rooms in the response.

    type

    If not nil, only list the rooms of this type. Otherwise all rooms are listed.

    sortBy

    Sort results by roomId(id), most recent activity(lastactivity), or most recently created(created). Possible values: id, lastactivity, created

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • Creates a room. The authenticated user is automatically added as a member of the room. See the Memberships API to learn how to add more people to the room.

    Since

    1.2.0

    See

    see MemebershipClient API

    Declaration

    Swift

    public func create(title: String, teamId: String? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Room>) -> Void)

    Parameters

    title

    A user-friendly name for the room.

    teamId

    If not nil, this room will be associated with the team by team id. Otherwise, this room is not associated with any team.

    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 room by id.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    roomId

    The identifier of the room.

    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 room by id.

    Since

    1.2.0

    Declaration

    Swift

    public func update(roomId: String, title: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Room>) -> Void)

    Parameters

    roomId

    The identifier of the room.

    title

    A user-friendly name for the room.

    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 room by id.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    roomId

    The identifier of the room.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void