blob: 6402db5b1bfb46dfe717f56023e2536b23ab0d75 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5/* eslint-disable no-unused-vars */
6
7/**
8 * Fetches the user from Monorai.
9 * @param {string} userName The resource name of the user.
10 * @return {User}
11 */
12function getUser(userName) {
13 const message = {'name': userName};
14 const url = URL + 'monorail.v3.Users/GetUser';
15 return run_(url, message);
16}
17
18/**
19 * Fetches the users from Monorail.
20 * @param {Array<string>} userNames The resource names of the users.
21 * @return {Array<User>}
22 */
23function batchGetUsers(userNames) {
24 const message = {'names': userNames};
25 const url = URL + 'monorail.v3.Users/BatchGetUsers';
26 return run_(url, message);
27}