@add_route("<STR_LIT>", "<STR_LIT>", methods=["<STR_LIT:GET>"])<EOL>@add_route("<STR_LIT>", "<STR_LIT>", methods=["<STR_LIT:GET>"])<EOL>def get(context, request, username=None):
user_ids = []<EOL>if api.is_anonymous():<EOL><INDENT>username = "<STR_LIT>"<EOL><DEDENT>if username is None:<EOL><INDENT>user_ids = api.get_member_ids()<EOL><DEDENT>elif username == "<STR_LIT>":<EOL><INDENT>current_user = api.get_current_user()<EOL>user_ids = [current_user.getId()]<EOL><DEDENT>else:<EOL><INDENT>user_ids = [username]<EOL><DEDENT>size = req.get_batch_size()<EOL>start = req.get_batch_start()<EOL>batch = api.make_batch(user_ids, size, start)<EOL>users = map(get_user_info, batch.get_batch())<EOL>return {<EOL>"<STR_LIT>": batch.get_pagesize(),<EOL>"<STR_LIT>": batch.make_next_url(),<EOL>"<STR_LIT>": batch.make_prev_url(),<EOL>"<STR_LIT>": batch.get_pagenumber(),<EOL>"<STR_LIT>": batch.get_numpages(),<EOL>"<STR_LIT:count>": batch.get_sequence_length(),<EOL>"<STR_LIT>": users,<EOL>}<EOL>
Plone users route