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.0Declaration
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
teamIdIf not nil, only list the rooms that are associated with the team by team id.
maxThe maximum number of rooms in the response.
typeIf not nil, only list the rooms of this type. Otherwise all rooms are listed.
sortBySort results by roomId(id), most recent activity(lastactivity), or most recently created(created). Possible values: id, lastactivity, created
queueThe queue on which the completion handler is dispatched.
completionHandlerA 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.0See
see MemebershipClient APIDeclaration
Swift
public func create(title: String, teamId: String? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Room>) -> Void)Parameters
titleA user-friendly name for the room.
teamIdIf not nil, this room will be associated with the team by team id. Otherwise, this room is not associated with any team.
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 room by id.
Since
1.2.0Declaration
Swift
public func get(roomId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Room>) -> Void)Parameters
roomIdThe identifier of the room.
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 room by id.
Since
1.2.0Declaration
Swift
public func update(roomId: String, title: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Room>) -> Void)Parameters
roomIdThe identifier of the room.
titleA user-friendly name for the room.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Deletes a room by id.
Since
1.2.0Declaration
Swift
public func delete(roomId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Any>) -> Void)Parameters
roomIdThe identifier of the room.
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
RoomClient Class Reference