'Send a Slack notification'

def notify(self, title, message, config):

    notification = {u'text': message, u'channel': config.get(u'channel'), u'username': config.get(u'username')}
    if config.get(u'icon_emoji'):
        notification[u'icon_emoji'] = (u':%s:' % config[u'icon_emoji'].strip(u':'))
    if config.get(u'icon_url'):
        notification[u'icon_url'] = config[u'icon_url']
    try:
        requests.post(config[u'web_hook_url'], json=notification)
    except RequestException as e:
        raise PluginWarning(e.args[0])
