def is_current_user_capable(api_name):
 user = get_current_user()
 if (not user):
  sys.stderr.write((('user is not logged in - cannot use api ' + api_name) + '\n'))
  return False
 email = user.email()
 return is_user_capable(email, api_name)

def is_current_user_capable ( api_name ) : user = get_current_user ( ) if ( not user ) : sys . stderr . write ( ( ( 'user is not logged in - cannot use api ' + api_name ) + '\n' ) ) return False email = user . email ( ) return is_user_capable ( email , api_name )
checks to see if the current user is capable to run a certain api args: api_name: a string of the api to check for returns: true if capable .