blob: 30611d84b6abe98ff40af6551d1d043c3a1a0439 [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001// Copyright 2020 The Chromium Authors
Copybara854996b2021-09-07 19:36:02 +00002// 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}