JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
135 stars 105 forks source link

Finish Powershell Cmdlet implementation #28

Closed brettwgreen closed 8 years ago

brettwgreen commented 8 years ago

Add a New-Connection Cmdlet. Refactor YouTrackCmdlet base class to make Connection a required param for all other Cmdlets

Usage like this:

$modulePath = "C:\Dev\YouTrackSharp\src\YouTrackSharp\bin\Debug\YouTrackSharp.dll"
Import-Module $modulePath
$conn = New-Connection -YouTrackHost "youtrack.jetbrains.net" -Username "MyUser" -Password "MyPassword$" -UseSSL $True -Port 443
$i = Get-issue -Connection $conn -IssueId "MyProject-567"
$issue = $i.ToExpandoObject()
Write-Host $issue["id"]
Write-Host $issue["summary"]
Write-Host $issue["description"]
brettwgreen commented 8 years ago