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
$originalWorkingDir = Get-Location; | |
$subDirectories = dir -Directory; | |
Foreach ($subDirectory in $subDirectories) | |
{ | |
$projectDir = Join-Path $originalWorkingDir $subDirectory; | |
$gitDir = Join-Path $projectDir '.git' | |
if (Test-Path $gitDir -PathType Container) | |
{ |
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
// Get GL Journals using the ?offset=xxx parameter | |
List<Journal> allJournals = new List<Journal>(); | |
List<Journal> batchOfJournals; | |
int skip = 0; | |
while ((batchOfJournals = repository.Journals.Skip(skip).ToList()).Count > 0) | |
{ | |
Console.WriteLine("Fetched {0} journals from API using skip={1}", batchOfJournals.Count, skip); | |
allJournals.AddRange(batchOfJournals); |
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
var querystrings = new System.Collections.Generic.Dictionary<string, string>(); | |
querystrings.Add("where", "ContactNumber = \"123\""); | |
querystrings.Add("order", "Name DESC"); | |
IConsumerRequest filteredGetContactRequest = consumerSession | |
.Request() | |
.ForMethod("GET") | |
.WithQueryParameters((IDictionary)querystrings) | |
.ForUri(new Uri("https://api.xero.com/api.xro/2.0/Contacts")) | |
.SignWithToken(accessToken); |