SpaceClient

public class SpaceClient

An iOS client wrapper of the Cisco Webex Spaces REST API .

Since

1.2.0
  • Enum for errors that can occur in the Space Client

    See more

    Declaration

    Swift

    public enum SpaceClientError : String
  • Lists all spaces where the authenticated user belongs.

    Since

    1.2.0

    Declaration

    Swift

    public func list(teamId: String? = nil, max: Int? = nil, type: SpaceType? = nil, sortBy: SpaceSortType? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<[Space]>) -> Void)

    Parameters

    teamId

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

    max

    The maximum number of spaces in the response.

    type

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

    sortBy

    Sort results by spaceId(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

  • Fetches a filtered list of spaces that you are already a part of.

    Since

    3.0.0

    Declaration

    Swift

    public func filter(query: String, completionHandler: @escaping ((_ searchResult: [Space]) -> Void))

    Parameters

    query

    The query to search spaces

    completionHandler

    A completion handler that gives the filtered list of Spaces

  • Retrieves the details for a space by id.

    Since

    1.2.0

    Declaration

    Swift

    public func get(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Space>) -> Void)

    Parameters

    spaceId

    The identifier of the space.

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

    See

    see MembershipClient API

    Declaration

    Swift

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

    Parameters

    title

    A user-friendly name for the space.

    teamId

    If not nil, this space will be associated with the team by team id. Otherwise, this space 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

  • Deletes a space by id.

    Since

    1.2.0

    Declaration

    Swift

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

    Parameters

    spaceId

    The identifier of the space.

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

    Since

    1.2.0

    Declaration

    Swift

    public func update(spaceId: String, title: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Space>) -> Void)

    Parameters

    spaceId

    The identifier of the space.

    title

    A user-friendly name for the space.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

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

    Declaration

    Swift

    public func getMeetingInfo(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<SpaceMeetingInfo>) -> Void)

    Parameters

    spaceId

    The identifier of the space.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

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

    Declaration

    Swift

    public func getWithReadStatus(spaceId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<SpaceReadStatus?>) -> Void)

    Parameters

    spaceId

    The identifier of the space.

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

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

    Since

    2.3.0

    Declaration

    Swift

    public func listWithReadStatus(max: UInt, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<[SpaceReadStatus]?>) -> Void)

    Parameters

    max

    recommend that the parameter is limited between 1 and 100

    queue

    The queue on which the completion handler is dispatched.

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void

  • The callback handler for incoming space events.

    Since

    2.3.0

    Declaration

    Swift

    public var onEvent: ((SpaceEvent) -> Void)? { get set }
  • The callback handler for incoming space events with the event payload.

    Since

    2.3.0

    Declaration

    Swift

    public var onEventWithPayload: ((SpaceEvent, WebexEventPayload) -> Void)? { get set }
  • The callback handler for when syncing status for spaces changes.

    Since

    3.8.0

    Declaration

    Swift

    public var onSyncingSpacesStatusChanged: ((_ isSyncInProgress: Bool) -> Void)? { get set }

    Parameters

    isSyncInProgress

    If true then syncing spaces Inprogress else syncing spaces Complete.

  • Denotes if syncing latest conversations to local data warehouse is complete

    Since

    3.8.0

    Declaration

    Swift

    public var isSpacesSyncCompleted: Bool { get }
  • Returns a list of spaces in which there are active calls.

    Since

    2.6.0

    Declaration

    Swift

    public func listWithActiveCalls(queue: DispatchQueue? = nil, completionHandler: @escaping (Result<[String]>) -> Void)

    Parameters

    completionHandler

    A closure to be executed once the request has finished.

    Return Value

    Void