-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
461 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,9 @@ function Add-GSCourseParticipant { | |
* the email address of the user | ||
* the string literal "me", indicating the requesting user | ||
.PARAMETER User | ||
The user to authenticate the request as | ||
.EXAMPLE | ||
Add-GSCourseParticipant -CourseId 'architecture-101' -Student [email protected],[email protected] -Teacher [email protected] | ||
#> | ||
|
@@ -42,12 +45,22 @@ function Add-GSCourseParticipant { | |
$Student, | ||
[parameter(Mandatory = $false,ValueFromPipelineByPropertyName = $true)] | ||
[String[]] | ||
$Teacher | ||
$Teacher, | ||
[parameter(Mandatory = $false)] | ||
[String] | ||
$User = $Script:PSGSuite.AdminEmail | ||
) | ||
Begin { | ||
if ($User -ceq 'me') { | ||
$User = $Script:PSGSuite.AdminEmail | ||
} | ||
elseif ($User -notlike "*@*.*") { | ||
$User = "$($User)@$($Script:PSGSuite.Domain)" | ||
} | ||
$serviceParams = @{ | ||
Scope = 'https://www.googleapis.com/auth/classroom.rosters' | ||
ServiceType = 'Google.Apis.Classroom.v1.ClassroomService' | ||
User = $User | ||
} | ||
$service = New-GoogleService @serviceParams | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,6 @@ function Get-GSCourse { | |
If excluded, returns the list of courses. | ||
.PARAMETER User | ||
The user to request course information as | ||
.PARAMETER Teacher | ||
Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: | ||
|
@@ -31,6 +28,9 @@ function Get-GSCourse { | |
.PARAMETER CourseStates | ||
Restricts returned courses to those in one of the specified states. | ||
.PARAMETER User | ||
The user to authenticate the request as | ||
.EXAMPLE | ||
Get-GSCourse -Teacher [email protected] | ||
#> | ||
|
@@ -41,9 +41,6 @@ function Get-GSCourse { | |
[ValidateNotNullOrEmpty()] | ||
[String[]] | ||
$Id, | ||
[parameter(Mandatory = $false)] | ||
[String] | ||
$User = $Script:PSGSuite.AdminEmail, | ||
[parameter(Mandatory = $false,ParameterSetName = "List")] | ||
[String] | ||
$Teacher, | ||
|
@@ -52,9 +49,18 @@ function Get-GSCourse { | |
$Student, | ||
[parameter(Mandatory = $false,ParameterSetName = "List")] | ||
[Google.Apis.Classroom.v1.CoursesResource+ListRequest+CourseStatesEnum[]] | ||
$CourseStates | ||
$CourseStates, | ||
[parameter(Mandatory = $false)] | ||
[String] | ||
$User = $Script:PSGSuite.AdminEmail | ||
) | ||
Begin { | ||
if ($User -ceq 'me') { | ||
$User = $Script:PSGSuite.AdminEmail | ||
} | ||
elseif ($User -notlike "*@*.*") { | ||
$User = "$($User)@$($Script:PSGSuite.Domain)" | ||
} | ||
$serviceParams = @{ | ||
Scope = 'https://www.googleapis.com/auth/classroom.courses' | ||
ServiceType = 'Google.Apis.Classroom.v1.ClassroomService' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,9 @@ function Get-GSCourseParticipant { | |
* the email address of the user | ||
* the string literal "me", indicating the requesting user | ||
.PARAMETER User | ||
The user to authenticate the request as | ||
.EXAMPLE | ||
Get-GSCourseParticipant -Teacher [email protected] | ||
#> | ||
|
@@ -52,12 +55,22 @@ function Get-GSCourseParticipant { | |
$Teacher, | ||
[parameter(Mandatory = $false,ParameterSetName = "Get")] | ||
[String[]] | ||
$Student | ||
$Student, | ||
[parameter(Mandatory = $false)] | ||
[String] | ||
$User = $Script:PSGSuite.AdminEmail | ||
) | ||
Begin { | ||
if ($User -ceq 'me') { | ||
$User = $Script:PSGSuite.AdminEmail | ||
} | ||
elseif ($User -notlike "*@*.*") { | ||
$User = "$($User)@$($Script:PSGSuite.Domain)" | ||
} | ||
$serviceParams = @{ | ||
Scope = 'https://www.googleapis.com/auth/classroom.rosters' | ||
ServiceType = 'Google.Apis.Classroom.v1.ClassroomService' | ||
User = $User | ||
} | ||
$service = New-GoogleService @serviceParams | ||
} | ||
|
Oops, something went wrong.