v5.2.0
This new release of the Nylas Python SDK brings a couple of critical fixes as well as enhancing support for Event Conference Sync with Auto Create Meetings (Private Beta) support as well as improving calendar availability support.
New Features
- Add support for calendar consecutive availability
- Add dynamic conferencing link creation support
Usage
Consecutive Availability
from nylas import APIClient
nylas = APIClient(
CLIENT_ID,
CLIENT_SECRET,
ACCESS_TOKEN
)
emails = [["[email protected]"], ["[email protected]", "[email protected]"]]
duration = 30
interval = 60
start_at = 1632236400
end_at = 1632240000
open_hours = api_client.open_hours(
[
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
],
[0],
"America/Chicago",
"10:00",
"14:00",
)
free_busy = [
{
"email": "[email protected]",
"time_slots": [
{
"object": "time_slot",
"status": "busy",
"start_time": 1632236400,
"end_time": 1632240000,
}
],
}
]
api_client.consecutive_availability(
emails,
duration,
interval,
start_at,
end_at,
free_busy=free_busy,
open_hours=open_hours,
)
Auto Create Meetings
To have Nylas autocreate the conference field for you, pass the autocreate
object to the new event:
from nylas import APIClient
nylas = APIClient(
CLIENT_ID,
CLIENT_SECRET,
ACCESS_TOKEN
)
#Create a new event
event = nylas.events.create()
# add conferencing details
event.conferencing = {
"provider": "Zoom Meeting",
"conferencing": {
"autocreate": {
"settings": {
"password": "1234",
},
},
},
}
A few notes and things to keep in mind:
- Only one of
details
orautocreate
can be present, and we have implemented client-side checking to enforce this rule - Autocreating conferencing data is an asynchronous operation on the server-side. The Event object returned will not have a conferencing field, but it should be available in a future get call once the conference is created on the backend. The initial Event object returned will have a
jobStatusId
value which can be used to check on the status of conference creation. - The
settings
object within theautocreate
object maps to the settings the Nylas API will send to the conference provider for the conference creation. For example with Zoom the settings object maps to Zoom's Create a Meeting object.