Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockStruct ¶
type BlockStruct struct {
Id string `json:"id"`
}
type CheckRequest ¶
type CheckRequest struct {
TaskIds []string `json:"taskIds"`
}
type ExportOption ¶
type ExportRequest ¶
type ExportRequest struct {
Task Task `json:"task"`
}
type ExportTask ¶
type ExportTask struct { PageId string TaskId string TaskResult NotionEnqueueTaskResponse TaskStatusResultItem NotionGetTaskResultItem FilePath string }
func (ExportTask) GetExportUrl ¶
func (et ExportTask) GetExportUrl() string
type NotionConfiguration ¶
type NotionConfiguration struct { Notion struct { Token string `json:"token"` TablePageUrl string `json:"table_page_url"` DownloadPath string `json:"download_path"` } `json:"notion"` }
func (NotionConfiguration) GetTableBlockId ¶
func (nc NotionConfiguration) GetTableBlockId() string
func (NotionConfiguration) GetTableViewId ¶
func (nc NotionConfiguration) GetTableViewId() string
func (NotionConfiguration) IsEmpty ¶
func (nc NotionConfiguration) IsEmpty() bool
type NotionEnqueueTaskResponse ¶
type NotionEnqueueTaskResponse struct { TaskId string `json:"taskId"` ErrorId string `json:"errorId"` Name string `json:"name"` Message string `json:"message"` ClientData struct { Type string `json:"type"` } `json:"clientData"` }
func (NotionEnqueueTaskResponse) HasErrors ¶
func (res NotionEnqueueTaskResponse) HasErrors() bool
type NotionGetTaskResultItem ¶
type NotionGetTaskResultItem struct { Id string `json:"id"` EventName string `json:"eventName"` Request struct { Block struct { Id string `json:"id"` } `json:"block"` Recursive bool `json:"recursive"` ExportOptions struct { ExportType string `json:"exportType"` TimeZone string `json:"timeZone"` } `json:"exportOptions"` } `json:"request"` Actor struct { Table string `json:"table"` Id string `json:"id"` } `json:"actor"` State string `json:"state"` RootRequest struct { EventName string `json:"eventName"` RequestId string `json:"requestId"` } `json:"rootRequest"` Headers struct { Ip string `json:"ip"` } `json:"headers"` Status struct { Type string `json:"type"` PagesExported int `json:"pagesExported"` ExportURL string `json:"exportURL"` } `json:"status"` Error string `json:"error"` }
type NotionGetTasksResponse ¶
type NotionGetTasksResponse struct {
Results []NotionGetTaskResultItem `json:"results"`
}
func (NotionGetTasksResponse) GetExportDataList ¶
func (res NotionGetTasksResponse) GetExportDataList(taskIdList []ExportTask) []ExportTask
func (NotionGetTasksResponse) HasErrors ¶
func (res NotionGetTasksResponse) HasErrors() bool
func (NotionGetTasksResponse) HasIncompleteTask ¶
func (res NotionGetTasksResponse) HasIncompleteTask() bool
type NotionPostItem ¶
type NotionPostItem struct {
tistoryAPIModel.PostData
}
func (*NotionPostItem) GetPageId ¶
func (npi *NotionPostItem) GetPageId() string
func (*NotionPostItem) SetProperty ¶
func (npi *NotionPostItem) SetProperty(collectionKey NotionSchema, key string, value interface{})
func (*NotionPostItem) ToTistoryPostData ¶
func (npi *NotionPostItem) ToTistoryPostData(blogName string, content string, categoryId string) (tistoryAPIModel.PostData, error)
type NotionRequest ¶
type NotionRequest interface { CheckRequest | ExportRequest }
type NotionSchema ¶
type NotionSchema struct { Title string ContentUrl string Visibility string Category string PublishDate string Tags string AcceptComment string Password string }
func (*NotionSchema) SetProperty ¶
func (ns *NotionSchema) SetProperty(key string, value string)
type Task ¶
type Task struct { EventName string `json:"eventName"` Request TaskRequest `json:"request"` }
type TaskRequest ¶
type TaskRequest struct { Block BlockStruct `json:"block"` ExportOptions ExportOption `json:"exportOptions"` Recursive bool `json:"recursive"` }
Click to show internal directories.
Click to hide internal directories.