-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing list functions for emarsys in #10
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
AptecoPSFramework/plugins/emarsys/Public/emarsys/Get-List.ps1
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,40 @@ | ||
|
||
function Get-List { | ||
[CmdletBinding()] | ||
param ( | ||
#[Parameter(Mandatory=$false)][Hashtable] $InputHashtable | ||
#[Parameter(Mandatory=$false)][Switch] $DebugMode = $false | ||
#[Parameter(Mandatory=$true)][Int] $ListId | ||
|
||
) | ||
|
||
begin { | ||
|
||
Invoke-EmarsysLogin | ||
|
||
} | ||
|
||
process { | ||
|
||
#| Out-GridView -PassThru | Select -first 20 | ||
# $fields | Out-GridView | ||
# #$fields | Export-Csv -Path ".\fields.csv" -Encoding Default -NoTypeInformation -Delimiter "`t" | ||
# #$fields | Select @{name="field_id";expression={ $_.id }}, @{name="fieldname";expression={$_.name}} -ExpandProperty choices | Export-Csv -Path ".\fields_choices.csv" -Encoding Default -NoTypeInformation -Delimiter "`t" | ||
|
||
# $c = Invoke-emarsys -cred $cred -uri "$( $settings.base )field/translate/de" -method Get | ||
|
||
$emarsys = $Script:variableCache.emarsys | ||
|
||
$lists = $emarsys.getLists() | ||
|
||
$lists | ||
|
||
} | ||
|
||
end { | ||
|
||
} | ||
|
||
} | ||
|
||
|
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