Created
November 18, 2012 21:04
-
-
Save dfinke/4107451 to your computer and use it in GitHub Desktop.
PowerShell Crunchbase function to get acquisitions by company
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
# 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