-
Notifications
You must be signed in to change notification settings - Fork 17
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
enhance: Outlook Calendar code tools #28
Conversation
6ff6c59
to
9e1af39
Compare
Signed-off-by: Grant Linville <[email protected]>
6f439d7
to
d608fdb
Compare
Signed-off-by: Grant Linville <[email protected]>
|
||
switch command { | ||
case "listCalendars": | ||
if err := commands.ListCalendars(context.Background()); err != nil { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]>
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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]>
apis/outlook/calendar/code/main.go
Outdated
startPtr *time.Time | ||
endPtr *time.Time |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]>
This adds a set of code-based tools for Outlook Calendar. I am not yet replacing the existing
manage
andread
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":
main.go
file, which figures out which command was called and reads environment variablescommands
package, which initializes the MS Graph client and handles outputgraph
package, which handles API calls using the MS Graph SDK