Skip to content

Commit

Permalink
Feature GitHub:11200 (Fix issue #11863)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannicktrinh committed Dec 4, 2024
1 parent 57921e7 commit 3d4faad
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions Project/Sources/Classes/Office365Calendar.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Function getCalendar($inID : Text; $inSelect : Text) : Object
Else
$urlParams:="me"
End if

If (Length(String($inID))>0)
$urlParams+="/calendars/"+cs.Tools.me.urlEncode($inID)
Else
Expand Down Expand Up @@ -65,24 +65,35 @@ Function getCalendarList($inParameters : Object) : Object
End if
$urlParams+="/calendars"

If (Length(String($inParameters.search))>0)
If ((Value type($inParameters.search)=Is text) && (Length(String($inParameters.search))>0))
$urlParams+=($delimiter+"$search="+$inParameters.search)
$delimiter:="&"
$headers:={ConsistencyLevel: "eventual"}
End if
If (Length(String($inParameters.filter))>0)
If ((Value type($inParameters.filter)=Is text) && (Length(String($inParameters.filter))>0))
$urlParams+=($delimiter+"$filter="+$inParameters.filter)
$delimiter:="&"
End if
If (Length(String($inParameters.select))>0)
$urlParams+=($delimiter+"$select="+$inParameters.select)
$delimiter:="&"
If (Not(Value type($inParameters.select)=Is undefined))
var $select : Text
Case of
: (Value type($inParameters.select)=Is text)
$select:=$inParameters.select
: (Value type($inParameters.select)=Is collection)
$select:=$inParameters.select.join(","; ck ignore null or empty)
Else
$select:=String($inParameters.select)
End case
If (Length($select)>0)
$urlParams+=($delimiter+"$select="+$select)
$delimiter:="&"
End if
End if
If (Not(Value type($inParameters.top)=Is undefined))
$urlParams+=($delimiter+"$top="+Choose(Value type($inParameters.top)=Is text; $inParameters.top; String($inParameters.top)))
$delimiter:="&"
End if
If (Length(String($inParameters.orderBy))>0)
If ((Value type($inParameters.orderBy)=Is text) && (Length(String($inParameters.orderBy))>0))
$urlParams+=($delimiter+"$orderBy="+$inParameters.orderBy)
$delimiter:="&"
End if
Expand Down

0 comments on commit 3d4faad

Please sign in to comment.