1

In my java application (spring boot), I'm trying to check if a specific date for Malaysia is a public holiday or not and the challenge is each state has its own Regional holidays on top of the national public holidays which has to be considered.

So my question is that can I do such a thing using Google Calendar API?

I've found this Post but I'm not sure if that would do what I'm trying to achieve.

Community
  • 1
  • 1
arash moeen
  • 4,533
  • 9
  • 40
  • 85

1 Answers1

1

I've combined some public resources and I'd do that this way:

You want to call for a calendar with id: en.malaysia#holiday@group.v.calendar.google.com
Call: GET https://www.googleapis.com/calendar/v3/calendars/{calendarId}
Authorisation:

This request requires authorization with at least one of the following scopes (...): https://www.googleapis.com/auth/calendar.readonly or https://www.googleapis.com/auth/calendar

--Api
--StackOverflow answer
--List of supported national calendars

Community
  • 1
  • 1
xenteros
  • 15,586
  • 12
  • 56
  • 91
  • ok that cleared some stuff for me but then how can I know which day is public holiday because using the form google has on the Api link you provided it just returns me these fields (kind, etag, id, summary, timeZone) – arash moeen Dec 09 '16 at 07:28