async def get_launches(self):
from .common import CommonFunctions<EOL>common = CommonFunctions(self.loop, self.session)<EOL>all_launches = []<EOL>launches = {}<EOL>data = await common.api_call(BASE_URL)<EOL>if data is None:<EOL><INDENT>LOGGER.error('<STR_LIT>')<EOL>return<EOL><DEDENT>for launch in data['<STR_LIT>']:<EOL><INDENT>lid = launch['<STR_LIT:id>']<EOL>launches[lid] = {}<EOL>try:<EOL><INDENT>launches[lid]['<STR_LIT:start>'] = await common.iso(launch['<STR_LIT>'])<EOL><DEDENT>except (LaunchesError, IndexError, KeyError, TypeError) as error:<EOL><INDENT>launches[lid]['<STR_LIT:start>'] = None<EOL>LOGGER.debug('<STR_LIT>', error)<EOL><DEDENT>try:<EOL><INDENT>launches[lid]['<STR_LIT>'] = launch['<STR_LIT>']<EOL><DEDENT>except (LaunchesError, IndexError, KeyError, TypeError) as error:<EOL><INDENT>launches[lid]['<STR_LIT>'] = None<EOL>LOGGER.debug('<STR_LIT>', error)<EOL><DEDENT>try:<EOL><INDENT>launches[lid]['<STR_LIT:name>'] = launch['<STR_LIT:name>']<EOL><DEDENT>except (LaunchesError, IndexError, KeyError, TypeError) as error:<EOL><INDENT>launches[lid]['<STR_LIT:name>'] = None<EOL>LOGGER.debug('<STR_LIT>', error)<EOL><DEDENT>try:<EOL><INDENT>launches[lid]['<STR_LIT>'] = (launch['<STR_LIT>'][<NUM_LIT:0>]['<STR_LIT>']<EOL>[<NUM_LIT:0>]['<STR_LIT:name>'])<EOL><DEDENT>except (LaunchesError, IndexError, KeyError, TypeError) as error:<EOL><INDENT>launches[lid]['<STR_LIT>'] = None<EOL>LOGGER.debug('<STR_LIT>', error)<EOL><DEDENT>try:<EOL><INDENT>launches[lid]['<STR_LIT>'] = (launch['<STR_LIT>'][<NUM_LIT:0>]<EOL>['<STR_LIT>'][<NUM_LIT:0>]<EOL>['<STR_LIT>'])<EOL><DEDENT>except (LaunchesError, IndexError, KeyError, TypeError) as error:<EOL><INDENT>launches[lid]['<STR_LIT>'] = None<EOL>LOGGER.debug('<STR_LIT>', error)<EOL><DEDENT>try:<EOL><INDENT>launches[lid]['<STR_LIT>'] = launch['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT>except (LaunchesError, IndexError, KeyError, TypeError) as error:<EOL><INDENT>launches[lid]['<STR_LIT>'] = None<EOL>LOGGER.debug('<STR_LIT>', error)<EOL><DEDENT>all_launches.append(launches[lid])<EOL><DEDENT>self._launches = await common.sort_data(all_launches, '<STR_LIT:start>')<EOL>
Get launch information.