Skip to content

Instantly share code, notes, and snippets.

@drmohundro
Last active December 21, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drmohundro/6312996 to your computer and use it in GitHub Desktop.
Save drmohundro/6312996 to your computer and use it in GitHub Desktop.
Simple PowerShell script to pull the DevLink agenda.
# NOTE: Only worked for DevLink 2013
$agenda = Invoke-RestMethod http://www.devlink.net/agenda.json
$speakers = Invoke-RestMethod http://www.devlink.net/speakers.json
$location = Invoke-RestMethod http://www.devlink.net/api/info/locations.json
$fullAgenda = $agenda | foreach {
# normalize the times to be datetime types
$startTime = ([DateTimeOffset]::Parse($_.start_time)).DateTime
$endTime = ([DateTimeOffset]::Parse($_.end_time)).DateTime
$entry = $_.entry
# speaker lookup
$foundSpeaker = $speakers | where { $_.id -eq $entry.speaker_id }
$foundRoom = $location | where { $_.id -eq $entry.location_id }
$speaker = ''
if ($foundSpeaker -ne $null) {
$speaker = $foundSpeaker.name
}
[PSCustomObject] @{
Title = $entry.title;
Speaker = $speaker;
Summary = $entry.summary;
Location = $foundRoom.name;
StartTime = $startTime;
EndTime = $endTime;
}
}
$fullAgenda
@drmohundro
Copy link
Author

This is just something I threw together to help me get the sessions so that I could plan out my trip. Oh, and it was totally unnecessary.

Just drop it in a folder and run it. Writing a module would have been overkill for this.

Example usage:

# pull all sessions for 8/30
$agenda = .\Get-DevLinkAgenda.ps1
$agenda | where { $_.StartTime.Date -eq '8/30/2013' } | Format-Table

Sample (trimmed) output:

Title                  Speaker               Summary               Location              StartTime             EndTime
-----                  -------               -------               --------              ---------             -------
Registration                                 Please have your t... Main Hall             8/30/2013 7:30:00 AM  8/30/2013 4:00:00 PM
How to Not Get Thro... Jim Cowart            How do you write l... Banquet Room F        8/30/2013 8:00:00 AM  8/30/2013 9:15:00 AM
The Super-Simple Wa... Nathan Honeycutt      You're a PowerShel... Meeting Room 4        8/30/2013 8:00:00 AM  8/30/2013 9:15:00 AM
AngularJS and TypeS... Jeremy Likness        Although native ap... Meeting Room 5        8/30/2013 8:00:00 AM  8/30/2013 9:15:00 AM
Introducing Angular... Shawn Wildermuth      Creating Single Pa... Meeting Room 14       8/30/2013 8:00:00 AM  8/30/2013 9:15:00 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment