v5.5.0
This new release of the Nylas Python SDK a new feature as well as an enhancement.
New Features
- Add support for
Event
to ICS
Enhancements
- Enable full payload response for exchanging the token for code
Usage
Generate ICS from Event
from nylas import APIClient
nylas = APIClient(
CLIENT_ID,
CLIENT_SECRET,
ACCESS_TOKEN
)
example_event = nylas.events.get('{id}')
# Generate an ICS from an event
ics = example_event.generate_ics()
# You can also pass ICS Options for more configuration
ics = example_event.generate_ics(
ical_uid="test_uuid",
method="add",
prodid="test_prodid"
)
Exchange Token for Code (full payload)
from nylas import APIClient
nylas = APIClient(
CLIENT_ID,
CLIENT_SECRET,
ACCESS_TOKEN
)
ACCESS_TOKEN = nylas.send_authorization('{code_from_nylas}')