Skip to content

Commit ed69a86

Browse files
committed
Feature GitHub:11199 (fix: now supports "primary" key as calendarId)
1 parent 67e3a7c commit ed69a86

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Project/Sources/Classes/GoogleCalendar.4dm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ Function getCalendar($inID : Text) : Object
2828
: (Type($inID)#Is text)
2929
Super._throwError(10; {which: "\"calendarId\""; function: "google.calendar.getCalendar"})
3030

31-
: (Length(String($inID))=0)
32-
Super._throwError(9; {which: "\"calendarId\""; function: "google.calendar.getCalendar"})
33-
3431
Else
3532

36-
var $URL : Text:=Super._getURL()+"users/me/calendarList/"+cs.Tools.me.urlEncode($inID)
33+
var $calendarID : Text:=(Length(String($inID))>0) ? $inID : "primary"
34+
var $URL : Text:=Super._getURL()+"users/me/calendarList/"+cs.Tools.me.urlEncode($calendarID)
3735
var $headers : Object:={Accept: "application/json"}
3836
$response:=Super._sendRequestAndWaitResponse("GET"; $URL; $headers)
3937

0 commit comments

Comments
 (0)