Get NotionBlock - fasteiner/Notion GitHub Wiki
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/get-block-children schema: 2.0.0 Type: Command
Retrieves a Notion block and its children up to a specified depth.
Get-NotionBlock -Block <notion_block> [-maxDepth <Object>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get-NotionBlock -BlockId <String> [-maxDepth <Object>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
The Get-NotionBlock function retrieves a Notion block and its children up to a specified depth. It can accept either a block object or a block ID as input.
$block = Get-NotionBlock -BlockId "some-block-id" -maxDepth 3
$block = Get-NotionBlock -Block $someBlockObject -maxDepth 2
The block to get the children from. This parameter is mandatory if using the "Object" parameter set.
Type: notion_block
Parameter Sets: Object
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The block ID to get the children from. This parameter is mandatory if using the "ID" parameter set.
Type: String
Parameter Sets: ID
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The maximum depth of children to retrieve. The default value is 5.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 5
Accept pipeline input: False
Accept wildcard characters: False
{{ 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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function requires the Invoke-NotionApiCall and Get-NotionBlockChildren functions to be defined.