def get_conversations_list()

in jobs/eam-integrations/scripts/slack_channels_integration.py [0:0]


    def get_conversations_list(self, days):

        #types = 'public_channel,private_channel'
        types = 'public_channel'
        channels_dict = self._slackAPI.get_conversations_list(types)
        days_ago = datetime.datetime.now() - datetime.timedelta(seconds=days)

                
        integration_report = [x for x in channels_dict
                              if channels_dict[x].get('name') == self.integration_report_channel 
                              ]

        archived = [x for x in channels_dict
                    if channels_dict[x].get('is_archived')
                    and channels_dict[x].get('id') not in self.donot_delete_lst]


        # excluding channels created within the past X days (from input)
        non_archived = [x for x in channels_dict
                        if channels_dict[x].get('is_archived') is False
                        and channels_dict[x].get('name') not in ['general',
                                                                 self.integration_report_channel]
                        and float(channels_dict[x].get('created')) < days_ago.timestamp()
                        and channels_dict[x].get('id') not in self.donot_delete_lst]
 

        return non_archived, archived, integration_report, channels_dict