Skip to content

Commit 4e59137

Browse files
authored
[TSDK-287] Fix Calendar availability functions not using the correct authentication method (#214)
The Calendar availability functions were using an incorrect authentication method when requesting to the API
1 parent 1bf2a25 commit 4e59137

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ nylas-python Changelog
44
Unreleased
55
----------------
66
* Add support for getting the number of queried objects (count view)
7+
* Fix Calendar availability functions not using the correct authentication method
78

89
v5.7.0
910
----------------

nylas/client/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def free_busy(self, emails, start_at, end_at):
287287
"start_time": start_time,
288288
"end_time": end_time,
289289
}
290-
resp = self._request(HttpMethod.POST, url, json=data)
290+
resp = self._request(HttpMethod.POST, url, json=data, cls=Calendar)
291291
_validate(resp)
292292
return resp.json()
293293

@@ -357,7 +357,7 @@ def availability(
357357
if round_robin is not None:
358358
data["round_robin"] = round_robin
359359

360-
resp = self._request(HttpMethod.POST, url, json=data)
360+
resp = self._request(HttpMethod.POST, url, json=data, cls=Calendar)
361361
_validate(resp)
362362
return resp.json()
363363

@@ -410,7 +410,7 @@ def consecutive_availability(
410410
if buffer is not None:
411411
data["buffer"] = buffer
412412

413-
resp = self._request(HttpMethod.POST, url, json=data)
413+
resp = self._request(HttpMethod.POST, url, json=data, cls=Calendar)
414414
_validate(resp)
415415
return resp.json()
416416

0 commit comments

Comments
 (0)