Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Handcrafted integers in a hurry
<#
.Synopsis
Acquires an organic, hand-crafter integer from Brooklyn Integers
.EXAMPLE
Get-ArtisanalInteger
.INPUTS
NONE
.OUTPUTS
An integer
.LINK
https://www.brooklynintegers.com/api/methods/
#>
function Get-ArtisanalInteger
{
[CmdletBinding()]
[OutputType([int])]
param()
$reqParams = @{
Method = 'Post'
Body = @{ method = 'brooklyn.integers.create' }
Uri = 'https://api.brooklynintegers.com/rest/'
}
return (Invoke-WebRequest @reqParams |ConvertFrom-Json).integer
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.