我正在使用Google云端硬盘并请求 drive.about.get 功能来获取用户信息。 https://developers.google.com/drive/v2/reference/about/get
我的要求如下:
GET https://www.googleapis.com/drive/v2/about?fields=name%2CpermissionId%2Cuser&key={YOUR_API_KEY}
但我的反应很奇怪。它会不时更改,并且不包含完整填充的用户对象。有时像这样(不行因为不包含 emailAddress 和图片字段):
200 OK
cache-control: private, max-age=0, must-revalidate, no-transform
content-encoding: gzip
content-length: 151
content-type: application/json; charset=UTF-8
date: Fri, 12 Sep 2014 15:51:47 GMT
etag: "fk0AzBEIhYhhdZ8fZzKcL1hA5NE/W33y6z2VnuSGTGHd_cjd7QpNhhs"
expires: Fri, 12 Sep 2014 15:51:47 GMT
server: GSE
{
"name": "home.yeti",
"user": {
"kind": "drive#user",
"displayName": "home.yeti",
"isAuthenticatedUser": true,
"permissionId": "06088609960457261118"
},
"permissionId": "06098609960457261118"
}
和其他时间一样:
200 OK
cache-control: private, max-age=0, must-revalidate, no-transform
content-encoding: gzip
content-length: 258
content-type: application/json; charset=UTF-8
date: Fri, 12 Sep 2014 15:56:17 GMT
etag: "fk0AzBCIhUhhdZ8fZzKcL1hA5NE/72uKqV5R8uJbs_WWsni_Ck_mO7U"
expires: Fri, 12 Sep 2014 15:56:17 GMT
server: GSE
{
"name": "Vlad Borg",
"user": {
"kind": "drive#user",
"displayName": "Vlad Borg",
"picture": {
"url": "https://lh3.googleusercontent.com/-Y1656aJNNcA/AAAAAAAAAAI/AAAAAAAAKaY/nK6wGD1k9hw/s64/photo.jpg"
},
"isAuthenticatedUser": true,
"permissionId": "06088609960457261118",
"emailAddress": "home.yeti@gmail.com"
},
"permissionId": "06088609960457261118"
}
确定它包含 emailAddress 和图片字段。
来自API explore的50%的请求会返回第一个响应。
我做错了什么?