Skip to content

Commit

Permalink
updated to include all fields in response
Browse files Browse the repository at this point in the history
  • Loading branch information
scrthq committed Mar 12, 2017
1 parent 8a9e1ca commit ae6af61
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Public/Get-GSTeamDrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion Public/Get-GSTeamDrivesList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 ")
Expand Down
2 changes: 1 addition & 1 deletion Public/New-GSTeamDrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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{$_}}
Expand Down
2 changes: 1 addition & 1 deletion Public/Update-GSTeamDrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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{$_}}
Expand Down

0 comments on commit ae6af61

Please sign in to comment.