def query_member_id(api_key, user_token, login_name):
 r = requests.get((API_URL_PREFIX + u'members/search'), params={u'login': login_name}, headers={u'Accept': u'application/json', u'X-BetaSeries-Version': u'2.1', u'X-BetaSeries-Key': api_key, u'X-BetaSeries-Token': user_token})
 assert (r.status_code == 200), (u'Bad HTTP status code: %s' % r.status_code)
 j = r.json()
 error_list = j[u'errors']
 for err in error_list:
  log.error(str(err))
 found_id = None
 if (not error_list):
  for candidate in j[u'users']:
   if (candidate[u'login'] == login_name):
    found_id = candidate[u'id']
    break
 return found_id

def query_member_id ( api_key , user_token , login_name ) : r = requests . get ( ( API_URL_PREFIX + u'members/search' ) , params = { u'login' : login_name } , headers = { u'Accept' : u'application/json' , u'X-BetaSeries-Version' : u'2.1' , u'X-BetaSeries-Key' : api_key , u'X-BetaSeries-Token' : user_token } ) assert ( r . status_code == 200 ) , ( u'Bad HTTP status code: %s' % r . status_code ) j = r . json ( ) error_list = j [ u'errors' ] for err in error_list : log . error ( str ( err ) ) found_id = None if ( not error_list ) : for candidate in j [ u'users' ] : if ( candidate [ u'login' ] == login_name ) : found_id = candidate [ u'id' ] break return found_id
get the member id of a member identified by its login name .