Skip to content

Commit

Permalink
Merge pull request #38 from nylas/freebusyaccount
Browse files Browse the repository at this point in the history
Add a new FreeBusyAccount class object
  • Loading branch information
betsyalegria authored Nov 21, 2019
2 parents d4707b5 + e60b3be commit caa011c
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 caa011c

Please sign in to comment.