Google Calendar

Google Calendar

Google Calendar

Asset Version: 1.0.0
  • Version 1.0.0
Last Published: May 16, 2017 By: Kony Team
52 0 0 8
Google Calendar data adapter lets you quickly integrate your app with Google Calendar, allowing you to access and manipulate events and other calendar data from within your application.

Requirements

  • MobileFabric
 

Features

  • Quickly integrate your app with Google Calendar
  • Ready to use data adapter- just import it and choose from list of available APIs
  • Access/Modify/Create/Delete events and other Calendar data

 Prerequisites

  • Kony Account
  • Kony MobileFabric 7.3

Google Calendar data adapter helps you integrate Google Calendar API into your applications. A mobile or web application integrated with Google Calendar API allows users to mark and track their events, find and view public calendar events, and many more. With a few clicks, you can import the data adapter into MobileFabric and then, using the MobileFabric console, you can make the required Google Calendar API calls and view responses.

Here is a use case that describes the use of the Google Calendar data adapter.

Use Case

Consider a case that you want to develop a mobile app that provides sports events information. Using the mobile app, users should be able to view the scheduled sports events and mark their Google Calendar to watch and track the events. You can use the Google Calendar data adapter to fulfill your requirement. To design and develop the app, do the following:

  1. Design and develop the user interface and functionality of the mobile app using Kony Visualizer.
  2. Import the Google Calendar data adapter into MobileFabric and create an integration service to connect to the Google Calendar API.
  3. Create operations with required APIs to fetch or set required details.
  4. Integrate the mobile app with the integration service and invoke the operations to execute as required.

The following sections help you use the Google Calendar data adapter:

Prerequisites

Before you start using the Google Calendar data adapter, ensure you have the following:

  1. A Kony account
  2. Kony MobileFabric 7.3
  3. A Google account with a client ID and client secret.

Importing the Google Calendar Data Adapter

You can import the Google Calendar data adapter into MobileFabric directly from Kony Marketplace or by importing the data adapter zip file.

To import the data adapter from Marketplace, do the following:

  1. Log on to your Kony account. The Dashboard page appears by default.
  2. In the left pane, click the API Management menu. The APIs tab opens by default.
    amadeus_api_page.png
  3. Click the Custom Data Adapters tab. The Custom Data Adapter page appears.
    amadeus_cda_import.png
  4. Click Import. The Import Data Adapter dialog appears.
    amadeus_import_da.png
  5. Click IMPORT FROM KONY MARKETPLACE. The Import Data Adapter from Kony Marketplace dialog appears with a list of available data adapters.
  6. Find and select the Google Calendar data adapter, and click IMPORT. The Google Calendar data adapter is listed on the Custom Data Adapters page.
    gcalendar_cda.png

To import the data adapter zip file, do the following:

  1. Perform steps 1 to 4 in the above procedure.
  2. Drag the data adapter zip file into the Drag a Data Adapter box.

    Alternatively, click browse. The Open dialog appears.

    Navigate to the location where you downloaded the data adapter (zip file) on your computer, select the component, and click Open. The Import Data Adapter dialog shows the selected component.

    Note:

    If the selected data adapter zip file is not the one that you want to import, click Remove.

  3. Click Import. The Google Calendar data adapter is listed on the Custom Data Adapters page.

Creating Identity Service for Authentication

Identity is a service that validates the authentication of the users before accessing your application. To integrate the Google Calendar data adapter with your mobile app, you must create an identity service with identity type as OAuth2.0. No other authentication protocols are supported.

To create an identity service with OAuth2.0, do the following:

  1. Log on to your Kony account. The Dashboard page appears by default.
  2. In the left pane, click the API Management menu. The APIs tab opens by default.
  3. Click the Identity tab. The Identity tab opens with a list of existing identity services.
  4. Click CONFIGURE NEW. The Create New page appears.
  5. In the Name box, type a unique name for your service.
  6. From the Type of Identity list, select OAuth 2.0.
    The Provider Details and Client Details sections appears.
  7. In the Grant Type box, by default, Authorization Code is selected.
  8. In the Authorization Endpoint box, copy and paste the https://accounts.google.com/o/oauth2/v2/auth link.
  9. In the Token Endpoint box, copy and paste the https://www.googleapis.com/oauth2/v4/token link.
  10. In the Scope box, copy and paste any one of the following links:
  11. In the Client ID box, type the client ID provided by Google.
  12. In the Client Secret box, type the client secret provided by Google.
  13. Click Test Login. The Identity Response dialog appears with a response similar to as shown in the following figure:
    gcalendar_idrspns.png

Creating an Integration Service with Google Calendar

After importing the Google Calendar data adapter and creating the identity service in MobileFabric, you must create an integration service with service type as Google Calendar and associate the integration service with the identity service.

To create an integration service with Google Calendar, do the following:

  1. After logging on to your Kony account, in the left pane, click the API Management menu. The APIs tab opens by default.
  2. Click the Integration tab. The Integration tab opens with a list of existing integration services.
  3. Click CONFIGURE NEW. The Service Definition tab opens.
  4. In the Name box, type a unique name for your service.
  5. From the Service Type list, select Google Calendar.
    Note:

    The Google Calendar is listed only after you import the Google Calendar data adapter into MobileFabric.

  6. In the Authentication section, from the list box, select the identity service that you created with OAuth2.0. For more information, see Creating Identity Service for Authentication.
  7. Click Save.

If the details provided are valid, the MobileFabric service connects to the Google Calendar API and allows you to make the API calls.

Refer to Integration Services for more information on creating and using integration services.

Creating an Operation

To make any API call in the MobileFabric console, you must create an operation for the respective API and then execute the operation. Executing an operation involves making the API call and viewing the response. For more information, see Executing an Operation.

Steps to create an operation for the insert API:

  1. After logging on to your Kony account, open the Google Calendar integration service.
  2. Click the Operations List tab. The Operations List tab opens.
  3. Click the context menu arrow to expand the Please Select list. The Calendar is displayed.
  4. Click the plus icon to expand the Calendar list.
  5. Click the plus icon to expand the Services list, and select Calendarcalendarsget.
    gcalendar_calendarinsert.png
  6. Click ADD OPERATION. The calendarcalendarsinsert operation is listed in the Configured Operations section.
    gcalendar_calendarinsert_oprtn.png

You can create operations with required APIs and save them in the Configured Operations section. You can then execute the operations whenever required.

Executing an Operation

Executing an operation involves making the API call by setting the necessary parameters and displaying the response. The procedure to execute any operation is same, but the request parameters of the APIs vary. To learn about the Google Calendar API parameters, see Documentation.

This section provides steps to execute the calendarcalendarsinsert. (explained in Creating an Operation).

Steps to execute the calendarcalendarsinsert operation:

  1. After logging on to your Kony account, open the Google Calendar integration service.
  2. Click the Operations List tab. The Operations List tab opens.
  3. Under the Configured Operations section, click the calendarcalendarsinsert operation. The calendarcalendarsinsert tab opens with the Request Input sub-tab and Body section opened by default.
    gcalendar_exeoprtn.png
  4. In the Name box, the name of the operation is displayed by default. If you want, you can change the name.
  5. On the Request Input tab, in the Body section, specify the appropriate values for the parameters.
    Note:

    For APIs that require parameters, id, role, and scope, ensure that the values of these parameters are not null. Specify the appropriate values or delete the parameters from the Body if they are not marked as REQUIRED. Otherwise, An error occurs in the output response.

  6. Click SAVE OPERATION.
  7. Click the Test tab, and then click SAVE AND FETCH RESPONSE. The Output Result dialog appears with a response.
    gcalendar_rspns.png