最轻量级(最轻量级)Google Drive REST API查询/响应?

时间:2021-04-09 15:23:29

When initializing the REST Google Drive API in an Android app, I need to 'poke' the server to produce the

在Android应用中初始化REST Google Drive API时,我需要“戳”服务器来生成

UserRecoverableAuthIOException

In order to minimize the network traffic, I'm searching for the most 'lightweight' request that would produce such an exception. Currently, I use the following construct:

为了最小化网络流量,我正在寻找会产生这种异常的最“轻量级”请求。目前,我使用以下构造:

com.google.api.services.drive.Drive svc;
svc.files().get("root").setFields("title").execute();

basically pulling the 'root' name.

基本上拉“根”名称。

Is this the lowest amount of traffic that would do the job?

这是做这项工作的最低流量吗?

1 个解决方案

#1


The amount of traffic that is generating is negligible. It won't count as much at all.

产生的流量可以忽略不计。它根本不算多少。

Unless it's for academic purposes you won't achieve anything more from further optimizing for speed. There's a point where it stops being a bottleneck.

除非是出于学术目的,否则你无法通过进一步优化速度来实现更多目标。有一点它不再是瓶颈。

So yes that is quite likely the lightest way you can generate the UserRecoverableAuthIOException

所以是的,这很可能是生成UserRecoverableAuthIOException的最轻的方式

#1


The amount of traffic that is generating is negligible. It won't count as much at all.

产生的流量可以忽略不计。它根本不算多少。

Unless it's for academic purposes you won't achieve anything more from further optimizing for speed. There's a point where it stops being a bottleneck.

除非是出于学术目的,否则你无法通过进一步优化速度来实现更多目标。有一点它不再是瓶颈。

So yes that is quite likely the lightest way you can generate the UserRecoverableAuthIOException

所以是的,这很可能是生成UserRecoverableAuthIOException的最轻的方式