Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Outlook Calendar code tools #28

Merged
merged 6 commits into from
Aug 28, 2024

Conversation

g-linville
Copy link
Collaborator

@g-linville g-linville commented Aug 23, 2024

This adds a set of code-based tools for Outlook Calendar. I am not yet replacing the existing manage and read tools. I'm going to wait until this is merged, and then change those over to start using this.

The code is basically organized into three "layers":

  • the main.go file, which figures out which command was called and reads environment variables
  • the commands package, which initializes the MS Graph client and handles output
  • the graph package, which handles API calls using the MS Graph SDK

@g-linville g-linville force-pushed the outlook-calendar-code-tool branch from 6ff6c59 to 9e1af39 Compare August 23, 2024 20:23
@g-linville g-linville force-pushed the outlook-calendar-code-tool branch from 6f439d7 to d608fdb Compare August 26, 2024 18:59
Signed-off-by: Grant Linville <[email protected]>

switch command {
case "listCalendars":
if err := commands.ListCalendars(context.Background()); err != nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now I'm just using context.Background() everywhere, but this can be easily changed. Just not sure if it is something that needs to be changed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds good to me.

Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville changed the title WIP: Outlook Calendar code tools enhance: Outlook Calendar code tools Aug 26, 2024
@g-linville g-linville marked this pull request as ready for review August 26, 2024 19:25
Copy link
Contributor

@thedadams thedadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to review everything before I left, but a few comments nonetheless.


switch command {
case "listCalendars":
if err := commands.ListCalendars(context.Background()); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds good to me.

Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville requested a review from thedadams August 27, 2024 01:18
Comment on lines 121 to 122
startPtr *time.Time
endPtr *time.Time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, pointers aren't used for time.Time. Sort of why there is a time.Time.IsZero() method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville merged commit 357cd30 into obot-platform:main Aug 28, 2024
@g-linville g-linville deleted the outlook-calendar-code-tool branch August 28, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants