forked from homotechsual/HaloAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHaloAPI.psm1
More file actions
22 lines (22 loc) · 1.09 KB
/
Copy pathHaloAPI.psm1
File metadata and controls
22 lines (22 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#Requires -Version 7
$PublicPath = Join-Path -Path $PSScriptRoot -ChildPath 'Public'
$PrivatePath = Join-Path -Path $PSScriptRoot -ChildPath 'Private'
$Functions = @(Get-ChildItem -Path $PublicPath -Include *.ps1 -Recurse) + @(Get-ChildItem -Path $PrivatePath -Include *.ps1 -Recurse)
# Import functions.
foreach ($Function in @($Functions)) {
try {
Write-Verbose ('Importing function {0}' -f $Function.FullName)
. $Function.FullName
} catch {
Write-Error -Message ('Failed to import function {0}: {1}' -f $Function.FullName, $_)
}
}
[int32]$Script:HAPIDefaultPageSize = 1000
New-Alias -Name 'Get-HaloArticle' -Value Get-HaloKBArticle
New-Alias -Name 'New-HaloArticle' -Value New-HaloKBArticle
New-Alias -Name 'Set-HaloArticle' -Value Set-HaloKBArticle
New-Alias -Name 'New-HaloArticleBatch' -Value New-HaloKBArticleBatch
New-Alias -Name 'Get-HaloCustomFields' -Value Get-HaloCustomField
New-Alias -Name 'Get-HaloWorkflows' -Value Get-HaloWorkflow
New-Alias -Name 'Get-HaloTabs' -Value Get-HaloTab
Export-ModuleMember -Function $Functions.BaseName -Alias *