我正在尝试在我的 TeamDrive google 上动态创建一个简单文件夹的脚本。
我在我的云端硬盘上成功做到了这一点,但在我的 TeamDrive 上却没有。好像我没有看到他们。
我的代码:
$TeamDriveList = new Google_Service_Drive_TeamDriveList($client);
print_r($TeamDriveList);
结果 :
Google_Service_Drive_TeamDriveList Object ( [collection_key:protected] => teamDrives [kind] => [nextPageToken] => [teamDrivesType:protected] => Google_Service_Drive_TeamDrive [teamDrivesDataType:protected] => array [internal_gapi_mappings:protected] => Array ( ) [modelData:protected] => Array ( ) [processed:protected] => Array ( ) )
如果我尝试使用 Google Console 测试,我会看到:
200
{
"kind": "drive#teamDriveList",
"teamDrives": [
{
"kind": "drive#teamDrive",
"id": "0AB0TME2EwUCRUk9PVA"
},
{
"kind": "drive#teamDrive",
"id": "0AD2eQbRih1DZUk9PVA"
}
]
}
当然我的 PHP 代码不正确。