commands

package
v6.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package commands implements the Notion CLI subcommands.

This file implements the `comment` command group, which exposes the Notion Comments API (Notion-Version 2026-03-11):

POST   /v1/comments
GET    /v1/comments?block_id=...
GET    /v1/comments/{id}
PATCH  /v1/comments/{id}
DELETE /v1/comments/{id}

Per the API contract, exactly one of `rich_text` or `markdown` must be provided when creating or updating a comment. The CLI surfaces `--text` (sugar for a single-run rich_text array) and `--rich-text <file>` (load a rich_text array from a JSON file).

Package commands implements the Notion CLI subcommands.

This file implements the `custom-emoji` command group, which exposes the Notion Custom Emojis API (Notion-Version 2026-03-11):

GET /v1/custom_emojis
GET /v1/custom_emojis/{id}

See https://developers.notion.com/reference/list-custom-emojis.

Package commands implements the Notion CLI subcommands.

This file implements the `files` command group, which exposes the Notion File Uploads API:

POST   /v1/file_uploads
POST   /v1/file_uploads/{id}/send
POST   /v1/file_uploads/{id}/complete
GET    /v1/file_uploads/{id}
GET    /v1/file_uploads

Single-part uploads (≤20 MB): create → send. Multi-part uploads (>20 MB): create with mode=multi_part → send each chunk (1-indexed part_number) → complete.

Package commands implements the Notion CLI subcommands.

This file implements the `view` command group, which exposes the Notion Views API (Notion-Version 2026-03-11):

POST   /v1/views
GET    /v1/views?database_id=...|data_source_id=...
GET    /v1/views/{view_id}
PATCH  /v1/views/{view_id}
DELETE /v1/views/{view_id}
POST   /v1/views/{view_id}/queries
GET    /v1/views/{view_id}/queries/{query_id}
DELETE /v1/views/{view_id}/queries/{query_id}

Cached query results expire 15 minutes after creation; clients should re-create the query if `expires_at` has passed before paginating.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthCommands

func RegisterAuthCommands(root *cobra.Command)

RegisterAuthCommands registers all auth subcommands under root.

func RegisterBatchCommands

func RegisterBatchCommands(root *cobra.Command)

RegisterBatchCommands registers all batch subcommands under root.

func RegisterBlockCommands

func RegisterBlockCommands(root *cobra.Command)

RegisterBlockCommands registers all block subcommands under root.

func RegisterCacheCommands

func RegisterCacheCommands(root *cobra.Command)

RegisterCacheCommands registers cache subcommands.

func RegisterCommentCommands

func RegisterCommentCommands(root *cobra.Command)

RegisterCommentCommands registers all comment subcommands under root.

func RegisterConfigCommands

func RegisterConfigCommands(root *cobra.Command)

RegisterConfigCommands registers config subcommands.

func RegisterCustomEmojiCommands

func RegisterCustomEmojiCommands(root *cobra.Command)

RegisterCustomEmojiCommands registers all custom-emoji subcommands under root.

func RegisterDBCommands

func RegisterDBCommands(root *cobra.Command)

RegisterDBCommands registers all database subcommands under root.

func RegisterDataSourceCommands

func RegisterDataSourceCommands(root *cobra.Command)

RegisterDataSourceCommands registers the `data-source` command group under root.

This is the explicit, low-level command group for the 2025-09-03 Notion API data source endpoints. `db query --data-source` remains the convenience path for querying through a database alias.

func RegisterDoctorCommand

func RegisterDoctorCommand(root *cobra.Command)

RegisterDoctorCommand registers the doctor command.

func RegisterFilesCommands

func RegisterFilesCommands(root *cobra.Command)

RegisterFilesCommands registers `files upload`, `files retrieve`, and `files list` under root.

func RegisterListCommand

func RegisterListCommand(root *cobra.Command)

RegisterListCommand registers the list command under root.

func RegisterMarkdownCommands

func RegisterMarkdownCommands(root *cobra.Command)

RegisterMarkdownCommands registers the `markdown` subcommand tree under root.

func RegisterPageCommands

func RegisterPageCommands(root *cobra.Command)

RegisterPageCommands registers all page subcommands under root.

func RegisterSearchCommand

func RegisterSearchCommand(root *cobra.Command)

RegisterSearchCommand registers the search command under root.

func RegisterSyncCommand

func RegisterSyncCommand(root *cobra.Command)

RegisterSyncCommand registers the sync command under root.

func RegisterUserCommands

func RegisterUserCommands(root *cobra.Command)

RegisterUserCommands registers all user subcommands under root.

func RegisterViewCommands

func RegisterViewCommands(root *cobra.Command)

RegisterViewCommands registers all view subcommands under root.

func RegisterWhoamiCommand

func RegisterWhoamiCommand(root *cobra.Command)

RegisterWhoamiCommand registers the whoami command.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL