Face Services
Pre-requisite: The user has to be signed in to perform the following operations.
Overview
The Face services APIs provide functionality to add and manage faces, update face information, retrieve faces, and delete face.
List Faces
To fetch all faces associated with a space, The following method can be used:
spaceId(required): The space ID of the User.queryItems(required): Contains the query parameters used to filter the face list.
Factory.faceService.getFaces(
spaceId: String,
queryItems: [QueryItem]
) -> IVPublisher<FaceListModel>
Create Face
To create a new face within a space, The following method can be used:
spaceId(required): The space ID of the User.request(required): Contains face profile information.
Factory.faceService.createFace(
spaceId: String,
request: UpdateFaceNameRequest
) -> IVPublisher<FaceResponseModel>
Update Face
To update an existing face, The following method can be used:
spaceId(required): The space ID of the User.faceId(required): The ID of the face.request(required): Contains the updated face information.
Factory.faceService.updateFace(
spaceId: String,
faceId: String,
request: UpdateFaceNameRequest
) -> IVPublisher<FaceItemModel>
Delete Face
To delete an existing face, The following method can be used:
spaceId(required): The space ID of the User.faceId(required): The ID of the face.
Factory.faceService.deleteFace(
spaceId: String,
faceId: String
) -> IVPublisher<Void>
Upload Face Images
To upload face images for a face, The following method can be used:
spaceId(required): The space ID of the User.face(required): The face profile for which images will be uploaded.images(required): Dictionary containing images grouped by face position.
Factory.faceService.uploadFaceImage(
spaceId: String,
face: FaceResponseModel,
images: [FacePosition: [UIImage]]
) -> AnyPublisher<ImageUploadingStatus, Never>