Skip to content

Subscribe to push for all Account calendars #1031

Answered by ecederstrand
suhanoves asked this question in Q&A
Discussion options

You must be logged in to vote

A single subscription can span multiple folders. That's the purpose of FolderCollection.subscribe_to_push() - it will create a single subscription covering all folders in the collection.

Something like FolderCollection(account=account, folders=(account.calendar,) + tuple(account.calendar.walk())).subscribe_to_push() should do what you want.

You're right that FolderCollection.subscribe_to_push() returns a generator. Looking at it again, I think that's an error. I'll have it fixed asap. For now, you can just do list(FolderCollection.subscribe_to_push())[0] since the generator should yield only one result.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ecederstrand
Comment options

Answer selected by suhanoves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants