Sync a JMAP account#
JMAPAdapter syncs the calendar events of one JMAP account through a calendaring-jmap client.
from calendaring_jmap import JMAPClient
from calendaring_sync.adapters.jmap import JMAPAdapter
with JMAPClient(url=URL, username=USERNAME, password=PASSWORD) as client:
adapter = JMAPAdapter(replica, client, account_id=client.get_account_id())
adapter.sync()
client.get_account_id() returns the session’s default account. To sync an account someone shared with you, pass its id instead. Each account is a scope of its own.