ZCAPIService | Zoho Creator Help

ZCAPIService

ZCAPIService

This service lets you fetch the list of applications and sections along with its components.

Methods
fetchSectionList(for:completionHandler:)To fetch the list of all sections and their components (Forms, Reports and Pages) and the list of all approvals in an application
 
fetchAppContext(for application: Application, completionHandler: @escaping (Result<AppContext>) -> Void)To fetch the appContext which contains the applicationId, appLinkName, scopeId of the application.
 
fetchThemeInfo(for application: Application, completionHandler: @escaping (Result<ThemeInfo>) -> Void)To fetch themeInfo of the application. This can be used to apply themes to your ViewController.
 
 
fetchSectionList(for:completionHandler:)

Parameters

application An object which holds Application Info.
completionHandler The application list will be returned to the completionHandler.
 
fetchNewNotificationRedirectionInfo(for appContext: AppContext? = nil, notificationID: String ,category: ZCNotification.Category, completionHandler: @escaping (Result<ZCNotificationRedirection>) -> Void)

Parameters


      appContext

This is mandatory and it holds application info. If not passed, then the API will not work. To get this appContext, use the fetchAppContext method in ZCAPIService. 
notificationID Contains the unique ID of a notification.
category Contains the notification category.

     completionHandler

The ZCNotificationRedirection will be returned to the  completionHandler.
 
fetchNewNotifications(for appContext: AppContext? = nil, lastNotificationID: String? ,filterUnread:Bool , filteredApp :ZCNotificationApp?, completionHandler: @escaping (Result<ZCNotificationList>) -> Void)

Parameters


            appContext


This is mandatory and it holds application info. If not passed, then the API will not work. To get this appContext, use the fetchAppContext method in ZCAPIService. 
 
lastNotificationID Will fetch notifications that have been sent after this notification ID. If 'nil', then all notifications will be fetched.
filteredUnread If true, it will fetch only unread notifications
else it will fetch all the notifications.

        filteredApp

    nil

      completionHandler

The ZCNotificationList will be returned to the  completionHandler.
 
 
fetchAppContext(for application: Application, completionHandler: @escaping (Result<AppContext>) -> Void)

Parameters

application An object which holds Application Info.
completionHandler AppContext will be returned to the completionHandler.
fetchThemeInfo(for application: Application, completionHandler: @escaping (Result<ThemeInfo>) -> Void)

Parameters

application An object which holds Application Info.
completionHandler ThemeInfo will be returned to the completionHandler.