Skip to content

Commit

Permalink
add .http file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcardif committed Sep 10, 2024
1 parent c80a7b5 commit dbadf1f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions src/CalendarSync.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### Sync new calendar events
POST http://localhost:7034/api/SyncNewEvents?BodyType=list
Content-Type: application/json

[
{
"WorkAccEventId": "work-event-123",
"StartTime": "2023-10-01T09:00:00",
"StartTimeWithTimeZone": "2023-10-01T09:00:00+00:00",
"EndTime": "2023-10-01T10:00:00",
"EndTimeWithTimeZone": "2023-10-01T10:00:00+00:00",
"Subject": "Team Meeting",
"Importance": "High",
"Start": "2023-10-01T09:00:00",
"End": "2023-10-01T10:00:00",
"StartWithTimeZone": "2023-10-01T09:00:00+00:00",
"EndWithTimeZone": "2023-10-01T10:00:00+00:00",
"Body": "Discuss project updates"
}
]



### Delete calendar event
POST http://localhost:7034/api/DeleteCalendarEvent?workAccEventId=work-event-123
Content-Type: application/json

2 changes: 1 addition & 1 deletion src/Services/GoogleCalendarService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class GoogleCalendarService
public CalendarService? AuthenticateAsync(string privateKeyFile)
{
// Use the Google .NET Client Library to make the API request
string[] scopes = { CalendarService.Scope.Calendar };
string[] scopes = [CalendarService.Scope.Calendar];

var credential = GoogleCredential.FromJson(privateKeyFile)
.CreateScoped(scopes);
Expand Down

0 comments on commit dbadf1f

Please sign in to comment.