Last Updated on : 2024-11-22 02:19:32download
API description
- (void)getFingerprintListWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
pageNo:(NSInteger)pageNo
pageSize:(NSInteger)pageSize
success:(ThingLockFingerprintSuccessList)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
deviceId | The device ID of the lock. |
pageNo | The page number. |
pageSize | The number of items returned per page. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared getFingerprintListWithSiteId:siteId
deviceId:self.devId
pageNo:self.pageNo
pageSize:20
success:^(NSArray<ThingLockFingerprintModel *> * _Nullable list, NSInteger totalPage) {
} failure:^(NSError *error) {
}];
API description
- (void)createLimitFingerprintWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
fingerprintName:(NSString *)fingerprintName
effectiveTimeInterval:(NSTimeInterval)effectiveTimeInterval
invalidTimeInterval:(NSTimeInterval)invalidTimeInterval
inputCallback:(ThingLockFingerprintInputCallback)inputCallback
success:(ThingSuccessHandler)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
lockDevId | The device ID of the lock. |
fingerprintName | The name of the fingerprint. |
effectiveTimeInterval | The time when the e-key becomes active, in seconds. It is timestamped at the top of the hour. For example, for 15:32, pass 15:00. |
invalidTimeInterval | The time when the e-key expires, in seconds. It is timestamped at the top of the hour. For example, for 18:24, pass 18:00. |
inputCallback | The fingerprint enrollment callback. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared createLimitFingerprintWithSiteId:SiteManager.shared.siteId
deviceId:self.devId
fingerprintName:self.nameLabel.text
effectiveTimeInterval:effectiveTime
invalidTimeInterval:invalidTime
inputCallback:^(NSInteger currentCount, NSInteger totalCount) {
} success:^{
} failure:^(NSError *error) {
}];
API description
- (void)createPermanentFingerprintWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
fingerprintName:(NSString *)fingerprintName
inputCallback:(ThingLockFingerprintInputCallback)inputCallback
success:(ThingSuccessHandler)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
deviceId | The device ID of the lock. |
fingerprintName | The name of the fingerprint. |
inputCallback | The enrollment process callback. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared createPermanentFingerprintWithSiteId:SiteManager.shared.siteId
deviceId:self.devId
fingerprintName:self.nameLabel.text
inputCallback:^(NSInteger currentCount, NSInteger totalCount) {
} success:^{
} failure:^(NSError *error) {
}];
API description
- (void)getFingerprintDetailWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
fingerprintId:(NSString *)fingerprintId
success:(ThingLockFingerprintSuccess)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
deviceId | The device ID of the lock. |
fingerprintId | The fingerprint ID. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared getFingerprintDetailWithSiteId:siteId
deviceId:self.devId
fingerprintId:self.fingerprintId
success:^(ThingLockFingerprintModel * _Nullable model) {
} failure:^(NSError *error) {
}];
API description
- (void)updateNameWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
fingerprintId:(NSString *)fingerprintId
fingerprintName:(NSString *)fingerprintName
success:(ThingSuccessHandler)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
deviceId | The device ID of the lock. |
fingerprintId | The fingerprint ID. |
fingerprintName | The name of the fingerprint. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared updateNameWithSiteId:siteId
deviceId:self.devId
fingerprintId:self.model.fingerprintId
fingerprintName:name
success:^{
} failure:^(NSError *error) {
}];
API description
- (void)removeFingerprintWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
fingerprintId:(NSString *)fingerprintId
lockId:(NSString *)lockId
success:(ThingSuccessHandler)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
deviceId | The device ID of the lock. |
fingerprintId | The fingerprint ID. |
lockId | The lockId of the fingerprint, corresponding to the lockId field in the fingerprint details. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared removeFingerprintWithSiteId:siteId
deviceId:self.devId
fingerprintId:self.fingerprintId
lockId:self.model.lockId
success:^{
} failure:^(NSError *error) {
}];
API description
- (void)clearAllFingerprintWithSiteId:(long long)siteId
deviceId:(NSString *)deviceId
success:(ThingSuccessHandler)success
failure:(ThingFailureError)failure;
Parameters
Parameter | Description |
---|---|
siteId | The site ID. |
deviceId | The device ID of the lock. |
success | The success callback. |
failure | The failure callback. |
Example
[ThingLockFingerprintManager.shared clearAllFingerprintWithSiteId:siteId
deviceId:self.devId
success:^{
} failure:^(NSError *error) {
}];
Emptying fingerprints will delete all enrolled fingerprints.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback