StefanGreve / profile

My PowerShell Profile
MIT License
7 stars 1 forks source link

Get-Calendar Update #9

Open StefanGreve opened 1 year ago

StefanGreve commented 1 year ago

Proposal

The Get-Calendar Cmdlet currently pretty-prints a specific month or year to the terminal, but something more useful than that would probably integrate data from Outlook or Gmail in some capacity. That way this new feature could emit an array of PowerShell object with the following properties:

Name Type Nullable
Subject string false
StartDate datetime true
EndDate datetime true
Location string true

List of proposed parameters:

Notes

  1. It's foreseeable that a Cmdlet with support for multiple Calendar providers would need to be split up into several functions. To keep the underlying functions private, declare these helper methods within the body of the Get-Calendar Cmdlet. One downside of this technique would be that it blows up the Cmdlet body considerably, but on the bright side it emphasizes that all these functions belong together.
  2. For Outlook there are at least two viable options for retrieving the Calendar data (COM Object or Microsoft Graph REST API). The first solution would limit Outlook users to Windows computers that already have Office365 installed, and from what I have gathered it's generally discouraged to use COM objects in this day and age. As far as Gmail is concerned, this blog post details the steps required to authenticate an application for accessing the Gmail API using OAuth v2.
  3. Clarify how API secrets are going to be stored persistently across all platforms following current best practices?