From ae6af61d43a13eadf6f53db1399a93abca3be374 Mon Sep 17 00:00:00 2001 From: Nate Ferrell Date: Sun, 12 Mar 2017 03:37:54 -0500 Subject: [PATCH] updated to include all fields in response --- Public/Get-GSTeamDrive.ps1 | 2 +- Public/Get-GSTeamDrivesList.ps1 | 2 +- Public/New-GSTeamDrive.ps1 | 2 +- Public/Update-GSTeamDrive.ps1 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Public/Get-GSTeamDrive.ps1 b/Public/Get-GSTeamDrive.ps1 index 9e0b16a8..7509807f 100644 --- a/Public/Get-GSTeamDrive.ps1 +++ b/Public/Get-GSTeamDrive.ps1 @@ -32,7 +32,7 @@ if (!$AccessToken) $header = @{ Authorization="Bearer $AccessToken" } -$URI = "https://www.googleapis.com/drive/v3/teamdrives/$TeamDriveID" +$URI = "https://www.googleapis.com/drive/v3/teamdrives/$TeamDriveID`?fields=capabilities%2Cid%2Ckind%2Cname" try { diff --git a/Public/Get-GSTeamDrivesList.ps1 b/Public/Get-GSTeamDrivesList.ps1 index c48e8e57..bb61f238 100644 --- a/Public/Get-GSTeamDrivesList.ps1 +++ b/Public/Get-GSTeamDrivesList.ps1 @@ -28,7 +28,7 @@ if (!$AccessToken) $header = @{ Authorization="Bearer $AccessToken" } -$URI = "https://www.googleapis.com/drive/v3/teamdrives?pageSize=$PageSize" +$URI = "https://www.googleapis.com/drive/v3/teamdrives?pageSize=$PageSize&fields=kind%2CnextPageToken%2CteamDrives" if ($Query) { $Query = $($Query -join " and ") diff --git a/Public/New-GSTeamDrive.ps1 b/Public/New-GSTeamDrive.ps1 index 3275382a..916d38dc 100644 --- a/Public/New-GSTeamDrive.ps1 +++ b/Public/New-GSTeamDrive.ps1 @@ -103,7 +103,7 @@ if($CanRenameTeamDrive -eq $true -or $CanRenameTeamDrive -eq $false){$body["capa if($CanShare -eq $true -or $CanShare -eq $false){$body["capabilities"].Add("canShare",$CanShare)} $body = $body | ConvertTo-Json -$URI = "https://www.googleapis.com/drive/v3/teamdrives?requestId=$RequestID" +$URI = "https://www.googleapis.com/drive/v3/teamdrives?requestId=$RequestID&fields=capabilities%2Cid%2Ckind%2Cname" try { $response = Invoke-RestMethod -Method Post -Uri $URI -Headers $header -Body $body -ContentType "application/json" | ForEach-Object {if($_.kind -like "*#*"){$_.PSObject.TypeNames.Insert(0,$(Convert-KindToType -Kind $_.kind));$_}else{$_}} diff --git a/Public/Update-GSTeamDrive.ps1 b/Public/Update-GSTeamDrive.ps1 index 5c077880..6bfe42ce 100644 --- a/Public/Update-GSTeamDrive.ps1 +++ b/Public/Update-GSTeamDrive.ps1 @@ -101,7 +101,7 @@ if($CanRenameTeamDrive -eq $true -or $CanRenameTeamDrive -eq $false){$body["capa if($CanShare -eq $true -or $CanShare -eq $false){$body["capabilities"].Add("canShare",$CanShare)} $body = $body | ConvertTo-Json -$URI = "https://www.googleapis.com/drive/v3/teamdrives/$TeamDriveID" +$URI = "https://www.googleapis.com/drive/v3/teamdrives/$TeamDriveID`?fields=capabilities%2Cid%2Ckind%2Cname" try { $response = Invoke-RestMethod -Method Patch -Uri $URI -Headers $header -Body $body -ContentType "application/json" | ForEach-Object {if($_.kind -like "*#*"){$_.PSObject.TypeNames.Insert(0,$(Convert-KindToType -Kind $_.kind));$_}else{$_}}