#NEWLINE# def init_app( self , app , **options ) : #NEWLINE# #INDENT# 'Configures the application.' #NEWLINE# sd = options . setdefault #NEWLINE# conf = app . config #NEWLINE# sd ( 'app_id' , conf . get ( 'PUSHER_APP_ID' ) ) #NEWLINE# sd ( 'key' , conf . get ( 'PUSHER_KEY' ) ) #NEWLINE# sd ( 'secret' , conf . get ( 'PUSHER_SECRET' ) ) #NEWLINE# sd ( 'ssl' , conf . get ( 'PUSHER_SSL' , True ) ) #NEWLINE# sd ( 'host' , conf . get ( 'PUSHER_HOST' ) ) #NEWLINE# sd ( 'port' , conf . get ( 'PUSHER_PORT' ) ) #NEWLINE# sd ( 'cluster' , conf . get ( 'PUSHER_CLUSTER' ) ) #NEWLINE# sd ( 'backend' , conf . get ( 'PUSHER_BACKEND' ) ) #NEWLINE# sd ( 'json_encoder' , ( conf . get ( 'PUSHER_JSON_ENCODER' ) or app . json_encoder ) ) #NEWLINE# sd ( 'json_decoder' , ( conf . get ( 'PUSHER_JSON_DECODER' ) or app . json_decoder ) ) #NEWLINE# if conf . get ( 'PUSHER_TIMEOUT' ) : #NEWLINE# #INDENT# sd ( 'timeout' , conf . get ( 'PUSHER_TIMEOUT' ) ) #NEWLINE# #UNINDENT# super ( Pusher , self ) . __init__ ( ** options ) #NEWLINE# if ( not hasattr ( app , 'extensions' ) ) : #NEWLINE# #INDENT# app . extensions = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# app . extensions [ 'pusher' ] = self