async def rtm(self) -> AsyncIterator[Event]:
response = cast(RTMStart, await self.api("<STR_LIT>"))<EOL>self.me = Auto.generate(response.self_, "<STR_LIT>", recursive=False)<EOL>self.team = Auto.generate(response.team, "<STR_LIT>", recursive=False)<EOL>self.channels.fill(Channel.build(item) for item in response.channels)<EOL>self.users.fill(User.build(item) for item in response.users)<EOL>self.groups.fill(Group.build(item) for item in response.groups)<EOL>log.debug(<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>)<EOL>async with self.session.ws_connect(response["<STR_LIT:url>"]) as ws:<EOL><INDENT>async for msg in ws:<EOL><INDENT>event: Event = Event.generate(msg.json(), recursive=False)<EOL>if event.type == "<STR_LIT>":<EOL><INDENT>break<EOL><DEDENT>yield event<EOL><DEDENT><DEDENT>
Connect to the realtime event API and start yielding events.