logentries_api/resources.py
def get(self, name_or_tag_id):
        """
        Get hooks by name or tag_id.
        :param name_or_tag_id: The hook's name or associated tag['id']
        :type name_or_tag_id: str

        :return: A list of matching tags. An empty list is returned if there are
            not any matches
        :rtype: list of dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
        """
        hooks = self.list()

        return [
            hook
            for hook
            in hooks
            if name_or_tag_id in hook.get('actions')
            or name_or_tag_id == hook.get('name')
        ]
def get(self, name_or_tag_id):
        """
        Get hooks by name or tag_id.
        :param name_or_tag_id: The hook's name or associated tag['id']
        :type name_or_tag_id: str

        :return: A list of matching tags. An empty list is returned if there are
            not any matches
        :rtype: list of dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
        """
        hooks = self.list()

        return [
            hook
            for hook
            in hooks
            if name_or_tag_id in hook.get('actions')
            or name_or_tag_id == hook.get('name')
        ]
def get ( self , name_or_tag_id ) : hooks = self . list ( ) return [ hook for hook in hooks if name_or_tag_id in hook . get ( 'actions' ) or name_or_tag_id == hook . get ( 'name' ) ]
Get hooks by name or tag_id.
        :param name_or_tag_id: The hook's name or associated tag['id']
        :type name_or_tag_id: str

        :return: A list of matching tags. An empty list is returned if there are
            not any matches
        :rtype: list of dict

        :raises: This will raise a
            :class:`ServerException<logentries_api.exceptions.ServerException>`
            if there is an error from Logentries
Get hooks by name or tag_id . : param name_or_tag_id : The hook s name or associated tag [ id ] : type name_or_tag_id : str