Consider my enum:
class Videos(IntEnum): # 1
CATS = 11
DOGS = 12
class Pictures(IntEnum): # 2
CATS = 21
DOGS = 22
class Category:
VIDEOS = Videos
PICTURES = Pictures
The API I’m dealing with lets me query just the parent category that includes all it’s children filter=1
(all videos) or specifically get a single child by specifying filter=11
(Cat videos)
How do i represent this in my Enum? Possibly somthing like Category.VIDEOS
being 1 while also allowing Category.VIDEOS.CATS
being 11?
I could just define another member called ALL i guess?
class Videos(IntEnum): # 1
ALL = 1
CATS = 11
DOGS = 12