@@ -45,7 +45,7 @@ class Image(BaseDataClass['ImageResponse']):
4545 #: This is the id of the room the image was taken it.
4646 room_id : Optional [int ]
4747 #: This is the event the image was taken during.
48- player_event_id : Optional [int ]
48+ event_id : Optional [int ]
4949 #: This is the date the image was taken on represented as an Unix integer.
5050 created_at : int
5151 #: This is the number of cheers the image has recieved.
@@ -59,7 +59,7 @@ class Image(BaseDataClass['ImageResponse']):
5959 #: This is a room object which represents the room the image was taken in.
6060 room : Optional ['Room' ] = None
6161 #: This is an event object which represents the event the image was taken during.
62- player_event : Optional ['Event' ] = None
62+ event : Optional ['Event' ] = None
6363 #: This is a list of player ids who cheered the image.
6464 cheer_player_ids : Optional [List [int ]] = None
6565 #: This is a list of comment objects that represent comments left on the image.
@@ -83,7 +83,7 @@ def patch_data(self, data: 'ImageResponse') -> None:
8383 self .player_id = data ['PlayerId' ]
8484 self .tagged_player_ids = data ['TaggedPlayerIds' ]
8585 self .room_id = data ['RoomId' ]
86- self .player_event_id = data ['PlayerEventId' ]
86+ self .event_id = data ['PlayerEventId' ]
8787 self .created_at = date_to_unix (data ['CreatedAt' ])
8888 self .cheer_count = data ['CheerCount' ]
8989 self .comment_count = data ['CommentCount' ]
@@ -139,18 +139,18 @@ async def get_room(self, include: int = 0, force: bool = False) -> 'Room':
139139 self .room = await self .client .rooms .fetch (self .room_id , include )
140140 return self .room
141141
142- async def get_player_event (self , force : bool = False ) -> Optional ['Event' ]:
142+ async def get_event (self , force : bool = False ) -> Optional ['Event' ]:
143143 """
144144 Fetches the event the image was taken in. Returns a
145145 cached result, if this function has been already called.
146146
147147 :param force: If true, fetches new data.
148148 :return: An event object, or None if the image wasn't taken in an event.
149149 """
150- if self .player_event_id is None : return None
151- if self .player_event is None or force :
152- self .player_event = await self .client .events .fetch (self .player_event_id )
153- return self .player_event
150+ if self .event_id is None : return None
151+ if self .event is None or force :
152+ self .event = await self .client .events .fetch (self .event_id )
153+ return self .event
154154
155155 async def get_cheers (self , force : bool = False ) -> List [int ]:
156156 """
0 commit comments