#NEWLINE# def send_message( self , message = '' , **kwargs ) : #NEWLINE# #INDENT# 'Send a message to a user.' #NEWLINE# title = kwargs . get ( ATTR_TITLE ) #NEWLINE# data = { #NEWLINE# #INDENT# 'event' : self . _event , #NEWLINE# 'trackers' : { #NEWLINE# #INDENT# self . _tracker : ( ( title + ' : ' ) + message ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# response = requests . post ( ( _RESOURCE + 'post' ) , data = json . dumps ( data ) , headers = message . _headers ) #NEWLINE# if ( response . json ( ) [ 'status' ] == 401 ) : #NEWLINE# #INDENT# _LOGGER . error ( response . json ( ) [ 'msg' ] , 'Please check your details at https://instapush.im/' )