Skip to content

Commit

Permalink
Add a new FreeBusyAccount class object
Browse files Browse the repository at this point in the history
  • Loading branch information
betsyalegria committed Nov 19, 2019
1 parent d4707b5 commit e60b3be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions exchangelib/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,17 @@ def __str__(self):
if self.fullname:
txt += ' (%s)' % self.fullname
return txt

class FreeBusyAccount(Account):
'''
The `FreeBusyAccount` class is necessary in order to fetch free-busy data via exchangelib.
`Protocol.get_free_busy_info` has an `accounts` parameter that needs to be type `Account`.
Those accounts don't have to be syncing with Nylas, and we don't need to run any authentication
on them. That's why `FreeBusyAccount` exists - this class extends from `Account` but should
never run any authentication logic.
'''
def __init__(self, primary_smtp_address):
# We are intentionally *not* calling the __init__ of it's super class,
# as to not run any authentication logic.
self.primary_smtp_address = primary_smtp_address

0 comments on commit e60b3be

Please sign in to comment.