PersonClient
public class PersonClient
An iOS client wrapper of the Cisco Webex People REST API .
Since
1.2.0-
Retrieves the details for a person by person id.
Since
1.2.0Declaration
Parameters
personId
The identifier of the person.
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 the authenticated user.
Since
1.2.0Declaration
Parameters
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 people in the authenticated user’s organization.
Since
1.2.0Declaration
Swift
public func list(email: EmailAddress? = nil, displayName: String? = nil, id: String? = nil, orgId: String? = nil, max: Int? = nil, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<[Person]>) -> Void)
Parameters
email
if not nil, only list people with this email address.
displayName
if not nil, only list people whose name starts with this string.
id
List people by ID. Accepts up to 85 person IDs separated by
orgId
List people in this organization. Only admin users of another organization (such as partners) may use this parameter.
max
The maximum number of people 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
-
create(email:
displayName: firstName: lastName: avatar: orgId: roles: licenses: siteUrls: queue: completionHandler: ) Create people in the authenticated user’s organization. Only admins are able to use this function
Since
1.4.0Declaration
Swift
public func create(email: EmailAddress, displayName: String? = nil, firstName: String? = nil, lastName: String? = nil, avatar: String? = nil, orgId: String? = nil, roles: [PersonRole] = [], licenses: [String] = [], siteUrls: [String] = [], queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Person>) -> Void)
Parameters
email
Email address of the person.
displayName
Full name of the person.
firstName
firstName name of the person.
lastName
lastName firstName name of the person.
avatar
URL to the person’s avatar in PNG format.
orgId
ID of the organization to which this person belongs.
roles
Roles of the person.
licenses
Licenses allocated to the person.
siteUrls
One or several site names where this user has a role (host or attendee)
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
Person
-
update(personId:
email: displayName: firstName: lastName: avatar: orgId: roles: licenses: siteUrls: queue: completionHandler: ) Update people in the authenticated user’s organization. Only admins are able to use this function
Since
1.4.0Declaration
Swift
public func update(personId: String, email: EmailAddress? = nil, displayName: String, firstName: String? = nil, lastName: String? = nil, avatar: String? = nil, orgId: String? = nil, roles: [PersonRole] = [], licenses: [String] = [], siteUrls: [String] = [], queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Person>) -> Void)
Parameters
personId
The identifier of the person.
email
Email address of the person.
displayName
Full name of the person.
firstName
firstName name of the person.
lastName
lastName firstName name of the person.
avatar
URL to the person’s avatar in PNG format.
orgId
ID of the organization to which this person belongs.
roles
Roles of the person.
licenses
Licenses allocated to the person.
siteUrls
One or several site names where this user has a role (host or attendee)
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
Person
-
Delete the details of person by person id. Only admins are able to use this function
Since
1.4.0Declaration
Swift
public func delete(personId: String, queue: DispatchQueue? = nil, completionHandler: @escaping (Result<Void>) -> Void)
Parameters
personId
The identifier of the person.
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
-
Start watching presence status update of the list of contact ids that are provided as input. Only valid contact Ids will be watched. Check [PresenceHandle.isValid] flag to know which contact Ids are valid. Same contact id can be watched multiple times and it will return different [PresenceHandle] objects. The application has to ensure to call the [stopWatchingPresences] API for the handles when not needed.
Since
3.10.0Declaration
Swift
public func startWatchingPresences(contactIds: [String], completionHandler: @escaping (Presence) -> Void) -> [PresenceHandle]
Parameters
contactIds
List of contacts ids whose presence states are to be watched.
completionHandler
Callback that is triggered when the presence state of any of the provided contact id is changed.
Return Value
[PresenceHandle]
-
Start watching presence status update of the list of one to one space ids that are provided as input. Only valid one to one space Ids will be watched. Same space id can be watched multiple times and it will return different [PresenceHandle] objects. The application has to ensure to call the [stopWatchingPresences] API for the handles when not needed.
Since
3.11.0Declaration
Swift
public func startWatchingPresenceForSpaces(spaceIds: [String], completionHandler: @escaping (Presence) -> Void) -> [PresenceHandle]
Parameters
spaceIds
List of one to one space ids whose presence states are to be watched.
completionHandler
Callback that is triggered when the presence state of any of the provided contact id is changed.
Return Value
[PresenceHandle]
-
Stop watching presence status of the list of presence handles that are provided as input.
Since
3.10.0Declaration
Swift
public func stopWatchingPresences(presenceHandles: [PresenceHandle])
Parameters
presenceHandles
List of presenceHandles whose presence states are not to be watched anymore
-
Declaration
Swift
public struct ProductCapability
-
To get the supported capability of the current user.
Since
3.10.1Declaration
Swift
public func getProductCapability() -> ProductCapability