Skip to content

Commit

Permalink
Feature GitHub:11199 (fix: now supports "primary" key as calendarId)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannicktrinh committed Nov 27, 2024
1 parent 67e3a7c commit ed69a86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Project/Sources/Classes/GoogleCalendar.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ Function getCalendar($inID : Text) : Object
: (Type($inID)#Is text)
Super._throwError(10; {which: "\"calendarId\""; function: "google.calendar.getCalendar"})

: (Length(String($inID))=0)
Super._throwError(9; {which: "\"calendarId\""; function: "google.calendar.getCalendar"})

Else

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

Expand Down

0 comments on commit ed69a86

Please sign in to comment.