Skip to content

Instantly share code, notes, and snippets.

@dfinke
Created November 18, 2012 21:04
Show Gist options
  • Save dfinke/4107451 to your computer and use it in GitHub Desktop.
Save dfinke/4107451 to your computer and use it in GitHub Desktop.
PowerShell Crunchbase function to get acquisitions by company
# http://developer.crunchbase.com/page
function Get-Acquisition {
param(
[Parameter(ValueFromPipeLine)]
$company = "facebook"
)
Process {
$url = "http://api.crunchbase.com/v/1/company/$($company).js"
(Invoke-RestMethod $url).acquisitions |
Select @{Name="Description"; Expression={$_.source_description}},
@{Name="Date"; Expression={
New-Object DateTime($_.acquired_year, $_.acquired_month, $_.acquired_day)
}}
}
}
cls
function ql {$args}
ql facebook microsoft ibm | Get-Acquisition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment