def query_series(api_key, user_token, member_name=None):
 params = {}
 if member_name:
  member_id = query_member_id(api_key, user_token, member_name)
  if member_id:
   params = {u'id': member_id}
  else:
   log.error((u'member %r not found' % member_name))
   return []
 r = requests.get((API_URL_PREFIX + u'members/infos'), params=params, 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))
 if (not error_list):
  return [x[u'title'] for x in j[u'member'][u'shows'] if (x[u'user'][u'archived'] is False)]
 else:
  return []

def query_series ( api_key , user_token , member_name = None ) : params = { } if member_name : member_id = query_member_id ( api_key , user_token , member_name ) if member_id : params = { u'id' : member_id } else : log . error ( ( u'member %r not found' % member_name ) ) return [ ] r = requests . get ( ( API_URL_PREFIX + u'members/infos' ) , params = params , 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 ) ) if ( not error_list ) : return [ x [ u'title' ] for x in j [ u'member' ] [ u'shows' ] if ( x [ u'user' ] [ u'archived' ] is False ) ] else : return [ ]
get the list of series followed by the authenticated user .