Invoke-BricksetRestMethod
SYNOPSIS
Wrapper for Invoke-RestMethod/Invoke-WebRequest with Brickset specifics
SYNTAX
Standard (Default)
Invoke-BricksetRestMethod -method <String> -uri <String> [-headers <IDictionary>] [-webRequest]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
OutFile
Invoke-BricksetRestMethod -method <String> -uri <String> [-headers <IDictionary>] [-outFile <String>]
[-webRequest] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Body
Invoke-BricksetRestMethod -method <String> -uri <String> [-headers <IDictionary>] [-body <Hashtable>]
[-webRequest] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Wrapper for Invoke-RestMethod/Invoke-WebRequest with Brickset specifics
EXAMPLES
EXAMPLE 1
$body = @{
apiKey ='4-r6wS-3JSq-xIpLe'
}
Invoke-BricksetRestMethod -Method POST -URI '/getThemes' -Body $body
PARAMETERS
-method
REST Method: Supported Methods: GET, POST, PUT,DELETE
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-uri
API URI, e.g. /getThemes
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-headers
Optionally supply custom headers
Type: IDictionary
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-body
REST Body in JSON format
Type: Hashtable
Parameter Sets: Body
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-outFile
Save the results to a file
Type: String
Parameter Sets: OutFile
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-webRequest
Use Invoke-WebRequest rather than the default Invoke-RestMethod
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.