Created
December 28, 2019 20:12
-
-
Save kjegru/9729056ffff00cda9eae993a3bd1854e to your computer and use it in GitHub Desktop.
Use Sheety as an API for Powershell. Using pokemons as an example.
This file contains hidden or 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
$url = "https://v2-api.sheety.co/randomstringnameforGoogleSheet/test/pokemons" | |
$contentType = "application/json" | |
$method = "POST" # GET DELETE PUT alternatively | |
$json = @" | |
{ | |
"pokemon": { | |
"id": 723, | |
"number": 722, | |
"name": "Weepinball", | |
"areasOfEncounter": "Route 12 + Route 13 + Route 12 (XY)", | |
"encounterType": "Grass", | |
"caught": "true" | |
} | |
} | |
"@ | |
Invoke-RestMethod -Method $method -Uri $url -ContentType $contentType -Body $json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment