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
personIdThe identifier of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personIdto get the personId of the member)queueIf not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.
completionHandlerA closure to be executed once the request has finished.
Return Value
Void
-
Retrieves the details for the authenticated user.
Since
1.2.0Declaration
Parameters
queueIf not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.
completionHandlerA 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
emailif not nil, only list people with this email address. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personEmailto get the email address of the member)displayNameif not nil, only list people whose name starts with this string.
idList people by ID. Accepts up to 85 person IDs separated by commas. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personIdto get the personId of the member)orgIdList people in this organization. Only admin users of another organization (such as partners) may use this parameter. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personOrgIdto get the orgId of the member)maxThe maximum number of people in the response.
queueIf not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.
completionHandlerA 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
emailEmail address of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personEmailto get the email address of the member)displayNameFull name of the person.
firstNamefirstName name of the person.
lastNamelastName firstName name of the person.
avatarURL to the person’s avatar in PNG format.
orgIdID of the organization to which this person belongs. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personOrgIdto get the orgId of the member)rolesRoles of the person.
licensesLicenses allocated to the person.
siteUrlsOne or several site names where this user has a role (host or attendee)
queueIf not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.
completionHandlerA 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
personIdThe identifier of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personIdto get the personId of the member)emailEmail address of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personEmailto get the email address of the member)displayNameFull name of the person.
firstNamefirstName name of the person.
lastNamelastName firstName name of the person.
avatarURL to the person’s avatar in PNG format.
orgIdID of the organization to which this person belongs. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personOrgIdto get the orgId of the member)rolesRoles of the person.
licensesLicenses allocated to the person.
siteUrlsOne or several site names where this user has a role (host or attendee)
queueIf not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.
completionHandlerA 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
personIdThe identifier of the person. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personIdto get the personId of the member)queueIf not nil, the queue on which the completion handler is dispatched. Otherwise, the handler is dispatched on the application’s main thread.
completionHandlerA 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
contactIdsList of contacts ids whose presence states are to be watched. (Derived parameter: Use
MembershipClient.list(...)to get the list of members. Then useMembership.personIdto get the personId of the member)completionHandlerCallback 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
spaceIdsList of one to one space ids whose presence states are to be watched. (Derived parameter: Use
SpaceClient.list(...)to get the list of spaces. Then useSpace.idto retrieve the spaceId)completionHandlerCallback 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
presenceHandlesList 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
View on GitHub