'Send a notification using PlexPy.
Required parameters:
agent_id(str):          The id of the notification agent to use
9    # Boxcar2
17   # Browser
10   # Email
16   # Facebook
0    # Growl
19   # Hipchat
12   # IFTTT
18   # Join
4    # NotifyMyAndroid
3    # Plex Home Theater
1    # Prowl
5    # Pushalot
6    # Pushbullet
7    # Pushover
15   # Scripts
14   # Slack
13   # Telegram
11   # Twitter
2    # XBMC
subject(str):           The subject of the message
body(str):              The body of the message
Optional parameters:
None
Returns:
None'

@cherrypy.expose
@requireAuth(member_of('admin'))
@addtoapi('notify')
def send_notification(self, agent_id=None, subject='PlexPy', body='Test    notification', notify_action=None, **kwargs):

    cherrypy.response.headers['Cache-Control'] = 'max-age=0,no-cache,no-store'
    test = ('test    ' if (notify_action == 'test') else '')
    if agent_id.isdigit():
        agents = notifiers.available_notification_agents()
        for agent in agents:
            if (int(agent_id) == agent['id']):
                this_agent = agent
                break
            else:
                this_agent = None
        if this_agent:
            logger.debug((u'Sending    %s%s    notification.' % (test, this_agent['name'])))
            if notifiers.send_notification(this_agent['id'], subject, body, notify_action, **kwargs):
                return 'Notification    sent.'
            else:
                return 'Notification    failed.'
        else:
            logger.debug((u'Unable    to    send    %snotification,    invalid    notification    agent    id    %s.' % (test, agent_id)))
            return ('Invalid    notification    agent    id    %s.' % agent_id)
    else:
        logger.debug((u'Unable    to    send    %snotification,    no    notification    agent    id    received.' % test))
        return 'No    notification    agent    id    received.'
