Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AddComment(pageID, text string) ([]byte, error)
- func (c *Client) AddCommentRichText(pageID string, richText []interface{}) ([]byte, error)
- func (c *Client) Delete(path string) ([]byte, error)
- func (c *Client) Get(path string) ([]byte, error)
- func (c *Client) GetBlock(blockID string) (map[string]interface{}, error)
- func (c *Client) GetBlockChildren(blockID string, pageSize int, startCursor string) (map[string]interface{}, error)
- func (c *Client) GetDatabase(dbID string) (map[string]interface{}, error)
- func (c *Client) GetMe() (map[string]interface{}, error)
- func (c *Client) GetPage(pageID string) (map[string]interface{}, error)
- func (c *Client) GetUser(userID string) (map[string]interface{}, error)
- func (c *Client) GetUsers(pageSize int, startCursor string) (map[string]interface{}, error)
- func (c *Client) ListComments(blockID string, pageSize int, startCursor string) (map[string]interface{}, error)
- func (c *Client) Patch(path string, body interface{}) ([]byte, error)
- func (c *Client) Post(path string, body interface{}) ([]byte, error)
- func (c *Client) QueryDatabase(dbID string, body map[string]interface{}) (map[string]interface{}, error)
- func (c *Client) Search(query string, filter string, pageSize int, startCursor string) (map[string]interface{}, error)
- func (c *Client) SetDebug(debug bool)
- func (c *Client) UploadFileContent(uploadID, fileName, contentType string, fileBytes []byte) error
Constants ¶
View Source
const ( BaseURL = "https://api.notion.com" NotionVersion = "2022-06-28" DefaultTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddComment ¶
AddComment adds a plain text comment to a page (no mentions).
func (*Client) AddCommentRichText ¶ added in v0.6.0
AddCommentRichText adds a comment with a rich_text array (supports mentions).
func (*Client) GetBlockChildren ¶
func (c *Client) GetBlockChildren(blockID string, pageSize int, startCursor string) (map[string]interface{}, error)
GetBlockChildren retrieves children of a block.
func (*Client) GetDatabase ¶
GetDatabase retrieves a database by ID.
func (*Client) ListComments ¶
func (c *Client) ListComments(blockID string, pageSize int, startCursor string) (map[string]interface{}, error)
ListComments lists comments on a block/page.
func (*Client) QueryDatabase ¶
func (c *Client) QueryDatabase(dbID string, body map[string]interface{}) (map[string]interface{}, error)
QueryDatabase queries a database with filters and sorts.
Click to show internal directories.
Click to hide internal directories.