-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Sekers/develop
Develop into Master 0.3.9
- Loading branch information
Showing
19 changed files
with
304 additions
and
31 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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
function Get-SchoolResourceBoard | ||
{ | ||
<# | ||
.LINK | ||
https://github.com/Sekers/SKYAPI/wiki | ||
.LINK | ||
Endpoint: https://developer.sky.blackbaud.com/docs/services/school/operations/V1ContentResourcesGet | ||
.SYNOPSIS | ||
Education Management School API - Returns a collection of Resources. | ||
.DESCRIPTION | ||
Education Management School API - Returns a collection of Resources. | ||
Requires the 'Parent', 'Faculty' or 'Student' role in the Education Management system. | ||
.PARAMETER ReturnRaw | ||
Returns the raw JSON content of the API call. | ||
.EXAMPLE | ||
Get-SchoolResourceBoard | ||
#> | ||
|
||
[cmdletbinding()] | ||
param( | ||
[Parameter( | ||
Position=0, | ||
ValueFromPipeline=$true, | ||
ValueFromPipelineByPropertyName=$true)] | ||
[switch]$ReturnRaw | ||
) | ||
|
||
# Set the endpoints | ||
$endpoint = 'https://api.sky.blackbaud.com/school/v1/content/resources' | ||
|
||
# Set the response field | ||
$ResponseField = "value" | ||
|
||
# Get the SKY API subscription key | ||
$sky_api_config = Get-SKYAPIConfig -ConfigPath $sky_api_config_file_path | ||
$sky_api_subscription_key = $sky_api_config.api_subscription_key | ||
|
||
# Grab the security tokens | ||
$AuthTokensFromFile = Get-SKYAPIAuthTokensFromFile | ||
|
||
if ($ReturnRaw) | ||
{ | ||
$response = Get-SKYAPIUnpagedEntity -url $endpoint -api_key $sky_api_subscription_key -authorisation $AuthTokensFromFile -ReturnRaw | ||
return $response | ||
} | ||
|
||
$response = Get-SKYAPIUnpagedEntity -url $endpoint -api_key $sky_api_subscription_key -authorisation $AuthTokensFromFile -response_field $ResponseField | ||
$response | ||
} |
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
function Get-SchoolSession | ||
{ | ||
<# | ||
.LINK | ||
https://github.com/Sekers/SKYAPI/wiki | ||
.LINK | ||
Endpoint: https://developer.sky.blackbaud.com/docs/services/school/operations/V1SessionsGet | ||
.SYNOPSIS | ||
Education Management School API - Returns a collection of sessions for a higher education institution. | ||
.DESCRIPTION | ||
Education Management School API - Returns a collection of sessions for a higher education institution. | ||
Accessible by any authorized user. | ||
.PARAMETER level_num | ||
Filter for a specific level number. | ||
Use Get-SchoolLevel to get a list of school levels. | ||
.PARAMETER school_year | ||
Filter for a specific school year. | ||
.PARAMETER ReturnRaw | ||
Returns the raw JSON content of the API call. | ||
.EXAMPLE | ||
Get-SchoolSession | ||
.EXAMPLE | ||
Get-SchoolSession -level_num 229 -school_year "2019-2020" | ||
#> | ||
|
||
[cmdletbinding()] | ||
Param( | ||
[Parameter( | ||
Position=0, | ||
ValueFromPipeline=$true, | ||
ValueFromPipelineByPropertyName=$true)] | ||
[int]$level_num, | ||
|
||
[parameter( | ||
Position=1, | ||
ValueFromPipeline=$true, | ||
ValueFromPipelineByPropertyName=$true)] | ||
[string]$school_year, | ||
|
||
[Parameter( | ||
Position=2, | ||
ValueFromPipeline=$true, | ||
ValueFromPipelineByPropertyName=$true)] | ||
[switch]$ReturnRaw | ||
) | ||
|
||
# Set the endpoints | ||
$endpoint = 'https://api.sky.blackbaud.com/school/v1/sessions' | ||
|
||
# Set the response field | ||
$ResponseField = "value" | ||
|
||
# Set the parameters | ||
$parameters = [System.Web.HttpUtility]::ParseQueryString([String]::Empty) | ||
foreach ($parameter in $PSBoundParameters.GetEnumerator()) | ||
{ | ||
$parameters.Add($parameter.Key,$parameter.Value) | ||
} | ||
|
||
# Remove parameters since we don't pass them on this way | ||
$parameters.Remove('ReturnRaw') | Out-Null | ||
|
||
# Get the SKY API subscription key | ||
$sky_api_config = Get-SKYAPIConfig -ConfigPath $sky_api_config_file_path | ||
$sky_api_subscription_key = $sky_api_config.api_subscription_key | ||
|
||
# Grab the security tokens | ||
$AuthTokensFromFile = Get-SKYAPIAuthTokensFromFile | ||
|
||
# Get data for one or more school levels | ||
if ($ReturnRaw) | ||
{ | ||
$response = Get-SKYAPIUnpagedEntity -url $endpoint -api_key $sky_api_subscription_key -authorisation $AuthTokensFromFile -params $parameters -ReturnRaw | ||
$response | ||
continue | ||
} | ||
|
||
$response = Get-SKYAPIUnpagedEntity -url $endpoint -api_key $sky_api_subscription_key -authorisation $AuthTokensFromFile -params $parameters -response_field $ResponseField | ||
$response | ||
} |
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
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
File renamed without changes.
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
Oops, something went wrong.