如何制作 People.GetBatchGet() return 特定尺寸的照片

How can I make People.GetBatchGet() return photos of a certain size

我目前正在使用 PeopleService.People.GetBatchGet() 来 return 提供的批次中用户的所有照片。我使用的方法 returns 将尺寸设置为 100 的照片。我想知道我是否可以接收不同尺寸的照片。

// peopleService is an object of type PeopleServiceService

var connection = peopleService.People.GetBatchGet();
connection.PersonFields = "photos";
connection.ResourceNames = resourceNames;

var result = connection.Execute();

result.ResponsesPersonResponse 个对象的列表。

因此,例如,result.Responses[0].Person.Photos[0].Url 将具有如下值:'https://lh4.googleusercontent.com/somecharacters/s100/photo.jpg'。

我注意到 's100' 实际上是图片的大小,如果我将其修改为另一个值,url 中的图片将具有该大小。

我想知道是否有任何方法可以使方法 return 的照片大小不同(可能向 connection 添加参数)。

peopleService.People.GetBatchGet() returns a person object which contains a photo object photo

{
  "metadata": {
    object (FieldMetadata)
  },
  "url": string,
  "default": boolean
}

这些图片为标准尺寸,无法更改。 api 不提供更改图像大小的选项 returns。

您可能会考虑将其添加为问题跟踪器上的功能请求https://issuetracker.google.com/issues?q=componentid:344199%2B