SpaceClient
public class SpaceClient
An iOS client wrapper of the Cisco Webex Spaces REST API .
Since
1.2.0-
The callback handler for incoming space events.
Since
2.3.0Declaration
Swift
public var onEvent: ((SpaceEvent) -> Void)? -
The callback handler for incoming space events.
Since
2.3.0Declaration
Swift
public var onEventWithPayload: ((SpaceEvent, WebexEventPayload) -> Void)? -
Lists all spaces where the authenticated user belongs.
Since
1.2.0Declaration
Swift
public func list(teamId: String? = nil, max: Int? = nil, type: SpaceType? = nil, sortBy: SpaceSortType? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<[Space]>) -> Void)Parameters
teamIdIf not nil, only list the spaces that are associated with the team by team id.
maxThe maximum number of spaces in the response.
typeIf not nil, only list the spaces of this type. Otherwise all spaces are listed.
sortBySort results by spaceId(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 space. The authenticated user is automatically added as a member of the space. See the Memberships API to learn how to add more people to the space.
Since
1.2.0See
see MemebershipClient APIDeclaration
Swift
public func create(title: String, teamId: String? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Space>) -> Void)Parameters
titleA user-friendly name for the space.
teamIdIf not nil, this space will be associated with the team by team id. Otherwise, this space 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 space by id.
Since
1.2.0Declaration
Swift
public func get(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Space>) -> Void)Parameters
spaceIdThe identifier of the space.
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 space by id.
Since
1.2.0Declaration
Swift
public func update(spaceId: String, title: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Space>) -> Void)Parameters
spaceIdThe identifier of the space.
titleA user-friendly name for the space.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Deletes a space by id.
Since
1.2.0Declaration
Swift
public func delete(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<Any>) -> Void)Parameters
spaceIdThe identifier of the space.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Shows Webex meeting details for a space such as the SIP address, meeting URL, toll-free and toll dial-in numbers.
Since
2.3.0Declaration
Swift
public func getMeetingInfo(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<SpaceMeetingInfo>) -> Void)Parameters
spaceIdThe identifier of the space.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Returns a SpaceReadStatus with the details about the date of the last activity in the space, and the date of current user last presence in the space.
For spaces where lastActivityDate > lastSeenDate the space can be considered to be “unread”
Since
2.3.0Declaration
Swift
public func getWithReadStatus(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<SpaceReadStatus>) -> Void)Parameters
spaceIdThe identifier of the space.
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Returns a list of SpaceReadStatus with details about the date of the last activity in the space, and the date of current user last presence in the space. The list is sorted with this with most recent activity first.
For spaces where lastActivityDate > lastSeenDate the space can be considered to be “unread”
Since
2.3.0Declaration
Swift
public func listWithReadStatus(max: UInt, queue: DispatchQueue? = nil, completionHandler: @escaping (ServiceResponse<[SpaceReadStatus]>) -> Void)Parameters
maxrecommend that the parameter is limited between 1 and 100
queueThe queue on which the completion handler is dispatched.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Returns a list of spaces in which there are active calls.
Since
2.6.0Declaration
Swift
public func listWithActiveCalls(queue: DispatchQueue? = nil, completionHandler: @escaping (Result<[String]>) -> Void)Parameters
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
SpaceClient Class Reference