ZCApprovalAPIService
This service lets you fetch Approval tasks in your Zoho Creator applications and execute approval actions.
Fetch approval List
Parameters
ApprovalAPIInfo | A Struct that has Creator app info and approval type. |
---|---|
formLinkname | String, Form for which the approval has to be fetched. |
andFromIndex | Int, List starting index. |
completionHandler | Approval data will be returned in completion Handler. |
Example
let approvalAPIInfo = ApprovalAPIInfo.init(appOwner: "<appOwner>", appLinkName: "<appLinkName>", listType: ApprovalAPIInfo.ApprovalListType.pending)
ZCApprovalAPIService.fetchApprovalList(for: approvalAPIInfo , withFormLinkname formLinkname: "<formLinkname>", andFromIndex fromIndex: 0) { (result) in
switch result
{
case .success(let approval):
print(approval.tasks)
case .failure(let error):
print(error)
}
}