async def api_call(self, endpoint):
data = None<EOL>if self.session is None:<EOL><INDENT>self.session = aiohttp.ClientSession()<EOL><DEDENT>try:<EOL><INDENT>async with async_timeout.timeout(<NUM_LIT:5>, loop=self.loop):<EOL><INDENT>response = await self.session.get(endpoint, headers=HEADERS)<EOL>data = await response.json()<EOL><DEDENT><DEDENT>except LaunchesError as error:<EOL><INDENT>LOGGER.error('<STR_LIT>', error)<EOL><DEDENT>return data<EOL>
Call the API.