Skip to content

Commit 299f402

Browse files
authored
Merge pull request #11 from krcb197/10-add-support-for-live-and-test-mode-event-flags
Add flags for events live/draft and in test_mode closes #10
2 parents 3e51619 + f08706f commit 299f402

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/pytito/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
1818
Variables that describes the Package
1919
"""
20-
__version__ = "0.0.8"
20+
__version__ = "0.0.9"

src/pytito/admin/event.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,17 @@ def activities(self) -> list[Activity]:
129129
retrieve all the activities for the event
130130
"""
131131
return self.__activity_getter()
132+
133+
@property
134+
def live(self) -> bool:
135+
"""
136+
Whether the event is live (or draft)
137+
"""
138+
return self._json_content['live']
139+
140+
@property
141+
def test_mode(self) -> bool:
142+
"""
143+
Whether the event is in test mode
144+
"""
145+
return self._json_content['test_mode']

0 commit comments

Comments
 (0)