#NEWLINE# def __init__( self , account , on_push = None , http_proxy_host = None , http_proxy_port = None ) : #NEWLINE# #INDENT# "\n        :param api_key: pushbullet Key\n        :param on_push: function that get's called on all pushes\n        :param http_proxy_host: host proxy (ie localhost)\n        :param http_proxy_port: host port (ie 3128)\n        " #NEWLINE# self . _account = account #NEWLINE# self . _api_key = self . _account . api_key #NEWLINE# Thread . __init__ ( self ) #NEWLINE# websocket . WebSocketApp . __init__ ( self , ( WEBSOCKET_URL + self . _api_key ) , on_open = self . on_open , on_message = self . on_message , on_close = self . on_close ) #NEWLINE# self . connected = False #NEWLINE# self . last_update = time . time ( ) #NEWLINE# self . on_push = http_proxy_host #NEWLINE# self . history = None #NEWLINE# self . clean_history ( ) #NEWLINE# self . http_proxy_host = http_proxy_host #NEWLINE# self . http_proxy_port = http_proxy_port #NEWLINE# self . proxies = None #NEWLINE# if ( ( http_proxy_port is not None ) and ( http_proxy_port is not None ) ) : #NEWLINE# #INDENT# self . proxies = { #NEWLINE# #INDENT# 'http' : ( ( ( 'http://' + http_proxy_host ) + ':' ) + str ( http_proxy_port ) ) , #NEWLINE# 'https' : ( ( ( 'http://' + http_proxy_host ) + ':' ) + str ( http_proxy_port ) ) , #NEWLINE# #UNINDENT# }