Bite size ballerina gists to help you improve on your integration work.

Thursday, June 1, 2017

Creating a Google Calendar Reminder with Ballerina

Ballerina makes it easy to use and tape together different API to create mashup applications and services. This example explores how ballerina can be used to invoke the Google Calendar API to create events that can work as a simple task reminder.

In order access Google API, you must create an application in the developer console[1], subscribe to the API you wish to use(in this case the calendar API) and generate Oauth credentials which can then be utilized to create an API key with the scopes needed for the API. Conversely, you could use the google playground application[2] to generate an API key to try out the example. To generate an API key this way,

A new google calendar event will get created based on the values passed in and a pop up reminder will be displayed 15 mins prior to the starting time.

You may follow a similar formula to utilize any other google API with ballerina. In a future post we will discuss how the google calendar API invocation logic may be abstracted into its own connector so that it can be conveniently utilized in other ballerina programs.Note: this example was written for ballerina 0.86 and it may not work with other versions.

About Me

Hello there, I hold a Bachelors in Computer Science from Edith Cowan University. My fascination with computers run back to the early 90s. I’ve been employed in IT since 2010, predominantly in a capacity of a Software Engineer. Over the years my technological interests have boiled down to Linux server crafting, Scripting languages, and a few other DevOps technologies.

When I’m not playing around with or consulting on technologies, which I care for, I find myself reading, blogging, appreciating art made with soul and spending time with my family.