Created
April 17, 2019 23:09
-
-
Save iaindooley/53f033a79cc8f921947b9e8358c4825f to your computer and use it in GitHub Desktop.
Google calendar with label colours
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createOrUpdateNewEventForDueDateAdded(notification) | |
{ | |
//Also fires for updated due date | |
var card = new Notification(notification).addedDueDate().card(); | |
createOrUpdateEventLinkedtoCard(card); | |
} | |
function updateLabelColour(notification) | |
{ | |
var label = new Notification(notification).addedLabel(); | |
setEventColourFromAddedLabel(label); | |
} | |
/** | |
* Create an event if one doesn't exist | |
* and add event ID to the Calendar Event ID | |
* custom field value on the card. | |
* | |
* If that field value already exists, update the | |
* event to the due date of the card, and update | |
* the label colour | |
*/ | |
function createOrUpdateEventLinkedtoCard(card) | |
{ | |
//NEEDS WORK ON CALENDAR API | |
} | |
/** | |
* Find the event linked to the card a | |
* label was added to, and set the event | |
* colour to that label | |
*/ | |
function setEventColourFromLabel(label) | |
{ | |
//NEEDS WORK ON CALENDAR API | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment