def get_channel_drives_and_children()

in ees_microsoft_teams/microsoft_teams_client.py [0:0]


    def get_channel_drives_and_children(self, next_url, object_type, team_name=""):
        """ Get channel documents from the Microsoft Teams with the support of pagination and filtration.
            :param next_url: URL to invoke Graph API call
            :param object_type: Object type to call the GET api
            :param team_name: Team for fetching channel documents
        """
        response_list = {"value": []}
        try:
            query = self.query_builder.get_query_for_drives_and_docs().strip()
            url = f"{next_url}{query}"
            response_json = self.get(url=url, object_type=object_type)
            return response_json

        except Exception as unknown_exception:
            self.logger.exception(
               f"Error while fetching channel documents the Microsoft Team. Error: {unknown_exception}"
            )

        parsed_response = get_data_from_http_response(
            logger=self.logger,
            response=response_list,
            error_message=f"Could not fetch the channel documents for team: {team_name}",
            exception_message=f"Error while fetching the channel documents for team: {team_name}"
        )
        return parsed_response