-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add creation command for view entities. Version 1.22.0
- Loading branch information
1 parent
9cebda0
commit bf3f7c9
Showing
5 changed files
with
118 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Function New-HaloViewColumn { | ||
<# | ||
.SYNOPSIS | ||
Creates one or more viewcolumns via the Halo API. | ||
.DESCRIPTION | ||
Function to send an viewcolumn creation request to the Halo API | ||
.OUTPUTS | ||
Outputs an object containing the response from the web request. | ||
#> | ||
[CmdletBinding( SupportsShouldProcess = $True )] | ||
[OutputType([Object[]])] | ||
Param ( | ||
# Object or array of objects containing properties and values used to create one or more new viewcolumns. | ||
[Parameter( Mandatory = $True )] | ||
[Object[]]$ViewColumn | ||
) | ||
Invoke-HaloPreFlightCheck | ||
try { | ||
if ($PSCmdlet.ShouldProcess($ViewColumn -is [Array] ? 'ViewColumns' : 'ViewColumn', 'Create')) { | ||
New-HaloPOSTRequest -Object $ViewColumn -Endpoint 'viewcolumns' | ||
} | ||
} catch { | ||
New-HaloError -ErrorRecord $_ | ||
} | ||
} |
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,25 @@ | ||
Function New-HaloViewFilter { | ||
<# | ||
.SYNOPSIS | ||
Creates one or more viewfilters via the Halo API. | ||
.DESCRIPTION | ||
Function to send an viewfilter creation request to the Halo API | ||
.OUTPUTS | ||
Outputs an object containing the response from the web request. | ||
#> | ||
[CmdletBinding( SupportsShouldProcess = $True )] | ||
[OutputType([Object[]])] | ||
Param ( | ||
# Object or array of objects containing properties and values used to create one or more new viewfilters. | ||
[Parameter( Mandatory = $True )] | ||
[Object[]]$ViewFilter | ||
) | ||
Invoke-HaloPreFlightCheck | ||
try { | ||
if ($PSCmdlet.ShouldProcess($ViewFilter -is [Array] ? 'ViewFilters' : 'ViewFilter', 'Create')) { | ||
New-HaloPOSTRequest -Object $ViewFilter -Endpoint 'viewfilter' | ||
} | ||
} catch { | ||
New-HaloError -ErrorRecord $_ | ||
} | ||
} |
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,25 @@ | ||
Function New-HaloViewList { | ||
<# | ||
.SYNOPSIS | ||
Creates one or more viewlists via the Halo API. | ||
.DESCRIPTION | ||
Function to send an viewlist creation request to the Halo API | ||
.OUTPUTS | ||
Outputs an object containing the response from the web request. | ||
#> | ||
[CmdletBinding( SupportsShouldProcess = $True )] | ||
[OutputType([Object[]])] | ||
Param ( | ||
# Object or array of objects containing properties and values used to create one or more new viewlists. | ||
[Parameter( Mandatory = $True )] | ||
[Object[]]$ViewList | ||
) | ||
Invoke-HaloPreFlightCheck | ||
try { | ||
if ($PSCmdlet.ShouldProcess($ViewList -is [Array] ? 'ViewLists' : 'ViewList', 'Create')) { | ||
New-HaloPOSTRequest -Object $ViewList -Endpoint 'viewlists' | ||
} | ||
} catch { | ||
New-HaloError -ErrorRecord $_ | ||
} | ||
} |
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,25 @@ | ||
Function New-HaloViewListGroup { | ||
<# | ||
.SYNOPSIS | ||
Creates one or more viewlistgroups via the Halo API. | ||
.DESCRIPTION | ||
Function to send an viewlistgroup creation request to the Halo API | ||
.OUTPUTS | ||
Outputs an object containing the response from the web request. | ||
#> | ||
[CmdletBinding( SupportsShouldProcess = $True )] | ||
[OutputType([Object[]])] | ||
Param ( | ||
# Object or array of objects containing properties and values used to create one or more new viewlistgroups. | ||
[Parameter( Mandatory = $True )] | ||
[Object[]]$ViewListGroup | ||
) | ||
Invoke-HaloPreFlightCheck | ||
try { | ||
if ($PSCmdlet.ShouldProcess($ViewListGroup -is [Array] ? 'ViewListGroups' : 'ViewListGroup', 'Create')) { | ||
New-HaloPOSTRequest -Object $ViewListGroup -Endpoint 'viewlistgroup' | ||
} | ||
} catch { | ||
New-HaloError -ErrorRecord $_ | ||
} | ||
} |