Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aetos382
Last active November 16, 2020 23:32
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 aetos382/404377b9c6c8f1f582cc67dda09f0f3f to your computer and use it in GitHub Desktop.
Save aetos382/404377b9c6c8f1f582cc67dda09f0f3f to your computer and use it in GitHub Desktop.
$url = 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery'
$headers = @{
'Content-Type' = 'application/json; charset=utf-8'
'Accept' = 'application/json; charset=utf-8; api-version=3.2-preview.1'
'User-Agent' = 'VSIDE-16.0.28803.352'
}
$body = @{
flags = 262
filters = @(
@{
criteria = @(
@{
filterType = 14
value = '1033'
},
@{
filterType = 14
value = '1041'
},
@{
filterType = 15
value = '16.0.28803.352'
},
@{
filterType = 8
value = 'Microsoft.VisualStudio.Pro'
},
@{
filterType = 8
value = 'Microsoft.VisualStudio.Community'
}
)
sortBy = 4
sortOrder = 2
pageSize = 25
pageNumber = 1
}
)
}
$bodyJson = ConvertTo-Json -InputObject $body -Depth 100
$bodyJson
$response = Invoke-RestMethod -Uri $url -Method Post -Headers $headers -Body $bodyJson
$response
{
"flags": "262",
"filters": [
{
"criteria": [
{
"filterType": "14",
"value": "1041"
},
{
"filterType": "15",
"value": "16.0.28803.352"
},
{
"filterType": "8",
"value": "Microsoft.VisualStudio.Pro"
},
{
"filterType": "8",
"value": "Microsoft.VisualStudio.Community"
},
{
"filterType": "8",
"value": "Microsoft.VisualStudio.IntegratedShell"
}
],
"sortBy": "4",
"sortOrder": "2",
"pageSize": "25",
"pageNumber": "1"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment