<s> import sys , os <EOL> sys . path . append ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT:..>' ) ) <EOL> import messagebird <EOL> try : <EOL> ACCESS_KEY <EOL> except NameError : <EOL> print ( '<STR_LIT>' ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> try : <EOL> PHONE_NUMBER <EOL> except NameError : <EOL> print ( '<STR_LIT>' ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> try : <EOL> client = messagebird . Client ( ACCESS_KEY ) <EOL> lookup = client . lookup ( PHONE_NUMBER ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' % lookup . href ) <EOL> print ( '<STR_LIT>' % lookup . phoneNumber ) <EOL> print ( '<STR_LIT>' % lookup . countryCode ) <EOL> print ( '<STR_LIT>' % lookup . countryPrefix ) <EOL> print ( '<STR_LIT>' % lookup . type ) <EOL> print ( '<STR_LIT>' % lookup . formats . e164 ) <EOL> print ( '<STR_LIT>' % lookup . formats . international ) <EOL> print ( '<STR_LIT>' % lookup . formats . national ) <EOL> print ( '<STR_LIT>' % lookup . formats . rfc3966 ) <EOL> if lookup . hlr is not None : <EOL> print ( '<STR_LIT>' % lookup . hlr . id ) <EOL> print ( '<STR_LIT>' % lookup . hlr . network ) <EOL> print ( '<STR_LIT>' % lookup . hlr . reference ) <EOL> print ( '<STR_LIT>' % lookup . hlr . status ) <EOL> print ( '<STR_LIT>' % lookup . hlr . createdDatetime ) <EOL> print ( '<STR_LIT>' % lookup . hlr . statusDatetime ) <EOL> except messagebird . client . ErrorException as e : <EOL> print ( '<STR_LIT>' ) <EOL> for error in e . errors : <EOL> print ( '<STR_LIT>' % error . code ) <EOL> print ( '<STR_LIT>' % error . description ) <EOL> print ( '<STR_LIT>' % error . parameter ) </s>
