notion

package
v0.0.0-...-90e558c Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Object     string `json:"object,omitempty"`
	Id         string `json:"id,omitempty"`
	Properties struct {
		ID struct {
			RichText []struct {
				Text struct {
					Content string `json:"content,omitempty"`
				} `json:"text,omitempty"`
			} `json:"rich_text,omitempty"`
		} `json:"id,omitempty"`
	} `json:"properties,omitempty"`
}

type NotionDatabaseQueryResp

type NotionDatabaseQueryResp struct {
	Object     string      `json:"object,omitempty"`
	Results    []Block     `json:"results,omitempty"`
	NextCursor interface{} `json:"next_cursor,omitempty"`
	HasMore    bool        `json:"has_more,omitempty"`
}

func (*NotionDatabaseQueryResp) GetArticleIds

func (r *NotionDatabaseQueryResp) GetArticleIds() []string

type NotionYouTubePage

type NotionYouTubePage struct {
	Parent struct {
		DatabaseId string `json:"database_id,omitempty"`
	} `json:"parent,omitempty"`
	Properties NotionYouTubePageProperties `json:"properties,omitempty"`
	Children   []interface{}               `json:"children,omitempty"`
}

func BuildCreateEntity

func BuildCreateEntity(databaseId string, item *youtube.PlaylistItem) NotionYouTubePage

type NotionYouTubePageProperties

type NotionYouTubePageProperties struct {
	Title       title.Title        `json:"标题,omitempty"`
	Id          rich_text.RichText `json:"ID,omitempty"`
	Image       files.Files        `json:"预览图片,omitempty"`
	ChannelName rich_text.RichText `json:"频道名,omitempty"`
	CreatedAt   date.Date          `json:"创建时间,omitempty"`
}

type Service

type Service interface {
	FindNotionPageExistedById(ids []string) ([]string, error)
	CreatePage(body string) error
}

func NewService

func NewService(token, databaseId string) Service

Directories

Path Synopsis
types
url

Jump to

Keyboard shortcuts

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