Closed ramos-ph closed 2 years ago
add this in the readme
took the liberty to include the "Workshops & Grupos de estudo" calendar on Marvin's Google account.
It wasn't showing anything regarding that when you logged in, though it's on the same organization. Did this because it was one of my attempts to solve this issue.
I apologize if this wasn't required.
so if someone else wants to configure this for another company will know who to do it
What does this PR do?
This PR updates the
getCalendarEvents
function used to retrieve data from marvin's Google Calendar. It moves the verification of dates inretrieveCalendar.js
to be a parameter in on the request calls. It also fixes the date exhibition. Previously, when requesting from Google API, it would show the date of creation of the events instead of the date of ocurrence. Courtesy of @paulodiovani :Also, there's a small update on the response. Instead of bringing every event on the current week, It'll bring events between the current day and the end of the current week.
Where should the reviewer start?
The reviewer can start by seeing the changes on
calendarEvents.js
and the respective API call change.NOTE: I'm opening this PR on a Friday, so there are no upcoming events. But you can hard-code a period to fetch data on
calendarEvents.js
:Just run
!calendar
to see the changesWhat testing has been done on this PR?
I've experimented a lot with the dates and events, trying to bring data from different periods. However, no new tests cases were added.
What are the relevant issues?
Currently when we run the
!calendar
command, we get an error.Screenshots (if appropriate)
Is this change backwards compatible or is it a breaking change?
It's backwards compatible. Though it won't bring the same result, depending on the day you're running.
Observations
I took the liberty to include the "Workshops & Grupos de estudo" calendar on Marvin's Google account. It wasn't showing anything regarding that when you logged in, though it's on the same organization. Did this because it was one of my attempts to solve this issue. I apologize if this wasn't required.