'Send a Rapidpush notification'

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

    notification = {u'title': title, u'message': message}
    if (not isinstance(config[u'api_key'], list)):
        config[u'api_key'] = [config[u'api_key']]
    if config.get(u'channel'):
        params = {u'command': u'broadcast'}
        notification[u'channel'] = config[u'channel']
    else:
        params = {u'command': u'notify'}
        notification[u'category'] = config[u'category']
        if config.get(u'group'):
            notification[u'group'] = config[u'group']
        if (config.get(u'priority') is not None):
            notification[u'priority'] = config[u'priority']
    params[u'data'] = json.dumps(notification)
    for key in config[u'api_key']:
        params[u'apikey'] = key
        try:
            response = requests.post(RAPIDPUSH_URL, params=params)
        except RequestException as e:
            raise PluginWarning(e.args[0])
        else:
            if (response.json()[u'code'] > 400):
                raise PluginWarning(response.json()[u'desc'])
