diff --git a/src/CalendarSync.http b/src/CalendarSync.http new file mode 100644 index 0000000..770218a --- /dev/null +++ b/src/CalendarSync.http @@ -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 + diff --git a/src/Services/GoogleCalendarService.cs b/src/Services/GoogleCalendarService.cs index 60d13b2..7b6bd20 100644 --- a/src/Services/GoogleCalendarService.cs +++ b/src/Services/GoogleCalendarService.cs @@ -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);