ConvertTo NotionObject - fasteiner/Notion GitHub Wiki
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/update-property-schema-object schema: 2.0.0 Type: Command
Converts an object to a TypeScript Notion object.
ConvertTo-NotionObject [-InputObject] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]
This function takes an object and converts it to a TypeScript Notion object.
$object = @{ object = "block"; type = "code" }
$convertedObject = ConvertTo-NotionObject -Object $object
Returns an block object of type "code".
$object = @{ object = "list"; results = @(@{ object = "block"; type = "paragraph" }, @{ object = "block"; type = "heading_1" }) }
$object | ConvertTo-NotionObject
Returns a list object with two block objects of type "paragraph" and "heading_1".
$object = @{ object = "block"; type = "bookmark" }
ConvertTo-NotionObject -InputObject $object
Returns a block object of type "bookmark".
The object to be converted.
Type: Object
Parameter Sets: (All)
Aliases: Object
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
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.