notionapi: Index | Files | Directories

package notionapi

import ""


Package Files

client.go constants.go date.go dbg.go debug.go dump_structure.go get_record_values.go get_signed_file_urls.go inline_block.go load_page_chunk.go page.go query_collection.go submit_transaction.go


const (
    // PermissionTypeUser describes permissions for a user
    PermissionTypeUser = "user_permission"
    // PermissionTypePublic describes permissions for public
    PermissionTypePublic = "public_permission"
const (
    // BlockPage is a notion Page
    BlockPage = "page"
    // BlockText is a text block
    BlockText = "text"
    // BlockBookmark is a bookmark block
    BlockBookmark = "bookmark"
    // BlockBulletedList is a bulleted list block
    BlockBulletedList = "bulleted_list"
    // BlockNumberedList is a numbered list block
    BlockNumberedList = "numbered_list"
    // BlockToggle is a toggle block
    BlockToggle = "toggle"
    // BlockTodo is a todo block
    BlockTodo = "to_do"
    // BlockDivider is a divider block
    BlockDivider = "divider"
    // BlockImage is an image block
    BlockImage = "image"
    // BlockHeader is a header block
    BlockHeader = "header"
    // BlockSubHeader is a header block
    BlockSubHeader = "sub_header"
    // BlockSubSubHeader
    BlockSubSubHeader = "sub_sub_header"
    // BlockQuote is a quote block
    BlockQuote = "quote"
    // BlockComment is a comment block
    BlockComment = "comment"
    // BlockCode is a code block
    BlockCode = "code"
    // BlockColumnList is for multi-column. Number of columns is
    // number of content blocks of type TypeColumn
    BlockColumnList = "column_list"
    // BlockColumn is a child of TypeColumnList
    BlockColumn = "column"
    // BlockTable is a table block
    BlockTable = "table"
    // BlockCollectionView is a collection view block
    BlockCollectionView = "collection_view"
    // BlockVideo is youtube video embed
    BlockVideo = "video"
    // BlockFile is an embedded file
    BlockFile = "file"
    // BlockPdf is an embedded pdf file
    BlockPDF = "pdf"
    // BlockGist is embedded gist block
    BlockGist = "gist"
    // BlockTweet is embedded gist block
    BlockTweet = "tweet"
    // BlockEmbed is a generic oembed link
    BlockEmbed = "embed"
const (
    // ColumnMultiSelect is multi-select column
    ColumnMultiSelect = "multi_select"
    ColumnTypeNumber  = "number"
    ColumnTypeTitle   = "title"

for CollectionColumnInfo.Type

const (
    // TableSpace represents a Notion workspace
    TableSpace = "space"
    // TableBlock represents a Notion block
    TableBlock = "block"
const (
    // RoleReader represents a reader
    RoleReader = "reader"
    // RoleEditor represents an editor
    RoleEditor = "editor"
const (
    // DateTypeDate represents a date in Date.Type
    DateTypeDate = "date"
    // DateTypeDateTime represents a datetime in Date.Type
    DateTypeDateTime = "datetime"
const (
    // InlineAt is what Notion uses for text to represent @user and @date blocks
    InlineAt = "‣"


var (
    // PanicOnFailures will force panics on unexpected situations.
    // This is for debugging
    PanicOnFailures bool

    // LogFunc allows intercepting debug logs
    LogFunc func(format string, args ...interface{})

func Dump Uses

func Dump(w io.Writer, page *Page)

Dump writes a simple representation of Page to w. A debugging helper.

func DumpToString Uses

func DumpToString(page *Page) string

DumpToString returns a simple representation of Page as a string. A debugging helper.

func ExtractNoDashIDFromNotionURL Uses

func ExtractNoDashIDFromNotionURL(uri string) string

ExtractNoDashIDFromNotionURL tries to extract notion page id from notion URL, e.g. given: returns ea07db1b9bff415ab180b0525f3898f6 returns "" if didn't detect valid notion id in the url

func ForEachBlock Uses

func ForEachBlock(blocks []*Block, cb func(*Block))

ForEachBlock traverses the tree of blocks and calls cb on every block in depth-first order. To traverse every blocks in a Page, do: ForEachBlock([]*notionapi.Block{page.Root}, cb)

func FormatDate Uses

func FormatDate(d *Date) string

FormatDate provides default formatting for Date TODO: add time zone, maybe

func IsValidDashID Uses

func IsValidDashID(id string) bool

IsValidDashID returns true if id looks like a valid Notion dash id

func IsValidNoDashID Uses

func IsValidNoDashID(id string) bool

IsValidNoDashID returns true if id looks like a valid Notion no dash id

func Log Uses

func Log(format string, args ...interface{})

Log is for debug logging, will log using LogFunc (if set)

func MaybePanic Uses

func MaybePanic(format string, args ...interface{})

MaybePanic will panic if PanicOnFailures is true

func ToDashID Uses

func ToDashID(id string) string

ToDashID convert id in format bb760e2dd6794b64b2a903005b21870a to bb760e2d-d679-4b64-b2a9-03005b21870a If id is not in that format, we leave it untouched.

func ToNoDashID Uses

func ToNoDashID(id string) string

ToNoDashID converts 2131b10c-ebf6-4938-a127-7089ff02dbe4 to 2131b10cebf64938a1277089ff02dbe4. If not in expected format, we leave it untouched

type AggregateQuery Uses

type AggregateQuery struct {
    AggregationType string `json:"aggregation_type"`
    ID              string `json:"id"`
    Property        string `json:"property"`
    Type            string `json:"type"`
    ViewType        string `json:"view_type"`

AggregateQuery describes an aggregate query

type AggregationResult Uses

type AggregationResult struct {
    ID    string `json:"id"`
    Value int64  `json:"value"`

AggregationResult represents result of aggregation

type AttrFlag Uses

type AttrFlag int

AttrFlag is a compact description of some flags

const (
    // AttrBold represents bold block
    AttrBold AttrFlag = 1 << iota
    // AttrCode represents code block
    // AttrItalic represents italic block
    // AttrStrikeThrought represents strikethrough block
    // AttrComment represents a comment block

type Block Uses

type Block struct {
    // a unique ID of the block
    ID  string `json:"id"`
    // values that come from JSON
    // if false, the page is deleted
    Alive bool `json:"alive"`
    // List of block ids for that make up content of this block
    // Use Content to get corresponding block (they are in the same order)
    ContentIDs   []string `json:"content,omitempty"`
    CopiedFrom   string   `json:"copied_from,omitempty"`
    CollectionID string   `json:"collection_id,omitempty"` // for BlockCollectionView
    // ID of the user who created this block
    CreatedBy   string `json:"created_by"`
    CreatedTime int64  `json:"created_time"`
    // List of block ids with discussion content
    DiscussionIDs []string `json:"discussion,omitempty"`
    // those ids seem to map to storage in s3
    FileIDs   []string        `json:"file_ids,omitempty"`
    FormatRaw json.RawMessage `json:"format,omitempty"`

    // TODO: don't know what this means
    IgnoreBlockCount bool `json:"ignore_block_count,omitempty"`

    // ID of the user who last edited this block
    LastEditedBy   string `json:"last_edited_by"`
    LastEditedTime int64  `json:"last_edited_time"`
    // ID of parent Block
    ParentID    string `json:"parent_id"`
    ParentTable string `json:"parent_table"`
    // not always available
    Permissions *[]Permission          `json:"permissions,omitempty"`
    Properties  map[string]interface{} `json:"properties,omitempty"`
    // type of the block e.g. TypeText, TypePage etc.
    Type string `json:"type"`
    // blocks are versioned
    Version int64    `json:"version"`
    ViewIDs []string `json:"view_ids,omitempty"`

    // Parent of this block
    Parent *Block `json:"-"`

    // maps ContentIDs array
    Content []*Block `json:"content_resolved,omitempty"`
    // this is for some types like TypePage, TypeText, TypeHeader etc.
    InlineContent []*InlineBlock `json:"inline_content,omitempty"`

    // for BlockPage
    Title string `json:"title,omitempty"`

    // For BlockTodo, a checked state
    IsChecked bool `json:"is_checked,omitempty"`

    // for BlockBookmark
    Description string `json:"description,omitempty"`
    Link        string `json:"link,omitempty"`

    // for BlockBookmark it's the url of the page
    // for BlockGist it's the url for the gist
    // fot BlockImage it's url of the image, but use ImageURL instead
    // because Source is sometimes not accessible
    // for BlockFile it's url of the file
    // for BlockEmbed it's url of the embed
    Source string `json:"source,omitempty"`

    // for BlockFile
    FileSize string `json:"file_size,omitempty"`

    // for BlockImage it's an URL built from Source that is always accessible
    ImageURL string `json:"image_url,omitempty"`

    // for BlockCode
    Code         string `json:"code,omitempty"`
    CodeLanguage string `json:"code_language,omitempty"`

    // for BlockCollectionView
    // It looks like the info about which view is selected is stored in browser
    CollectionViews []*CollectionViewInfo `json:"collection_views,omitempty"`

    FormatPage     *FormatPage     `json:"format_page,omitempty"`
    FormatBookmark *FormatBookmark `json:"format_bookmark,omitempty"`
    FormatImage    *FormatImage    `json:"format_image,omitempty"`
    FormatColumn   *FormatColumn   `json:"format_column,omitempty"`
    FormatText     *FormatText     `json:"format_text,omitempty"`
    FormatTable    *FormatTable    `json:"format_table,omitempty"`
    FormatVideo    *FormatVideo    `json:"format_video,omitempty"`
    FormatEmbed    *FormatEmbed    `json:"format_embed,omitempty"`

Block describes a block

func (*Block) CreatedOn Uses

func (b *Block) CreatedOn() time.Time

CreatedOn return the time the page was created

func (*Block) GetPageType Uses

func (b *Block) GetPageType() BlockPageType

GetPageType returns type of this page

func (*Block) IsCode Uses

func (b *Block) IsCode() bool

IsCode returns true if block represents a code block

func (*Block) IsImage Uses

func (b *Block) IsImage() bool

IsImage returns true if block represents an image

func (*Block) IsLinkToPage Uses

func (b *Block) IsLinkToPage() bool

IsLinkToPage returns true if block element is a link to a page (as opposed to embedded page)

func (*Block) IsPage Uses

func (b *Block) IsPage() bool

IsPage returns true if block represents a page (either a sub-page or a link to a page)

func (*Block) UpdatedOn Uses

func (b *Block) UpdatedOn() time.Time

UpdatedOn returns the time the page was last updated

type BlockPageType Uses

type BlockPageType int

BlockPageType defines a type of BlockPage block

const (
    // BlockPageTopLevel is top-level block for the whole page
    BlockPageTopLevel BlockPageType = iota
    // BlockPageSubPage is a sub-page
    // BlockPageLink a link to a page

type BlockWithRole Uses

type BlockWithRole struct {
    Role  string `json:"role"`
    Value *Block `json:"value"`

BlockWithRole describes a block info

type Client Uses

type Client struct {
    // AuthToken allows accessing non-public pages.
    AuthToken string
    // HTTPClient allows over-riding http.Client to e.g. implement caching
    // on a per-request level
    HTTPClient *http.Client
    // Logger is used to log requests and responses for debugging.
    // By default is not set.
    Logger io.Writer
    // DebugLog enables debug logging
    DebugLog bool

Client is client for invoking Notion API

func (*Client) DownloadFile Uses

func (c *Client) DownloadFile(uri string) (*DownloadFileResponse, error)

DownloadFile downloads a file stored in Notion

func (*Client) DownloadPage Uses

func (c *Client) DownloadPage(pageID string) (*Page, error)

DownloadPage returns Notion page data given its id

func (*Client) GetRecordValues Uses

func (c *Client) GetRecordValues(ids []string) (*GetRecordValuesResponse, error)

GetRecordValues executes a raw API call /api/v3/getRecordValues

func (*Client) GetSignedFileUrls Uses

func (c *Client) GetSignedFileUrls(urls []string) (*GetSignedFileUrlsResponse, error)

GetSignedFileUrls executes a raw API call /api/v3/getSignedFileUrls For files (e.g. images) stored in Notion we need to get a temporary download url (which will be valid for only a short period of time)

func (*Client) LoadPageChunk Uses

func (c *Client) LoadPageChunk(pageID string, chunkNo int, cur *cursor) (*LoadPageChunkResponse, error)

LoadPageChunk executes a raw API call /api/v3/loadPageChunk

func (*Client) QueryCollection Uses

func (c *Client) QueryCollection(collectionID, collectionViewID string, aggregateQuery []*AggregateQuery, user *User) (*QueryCollectionResponse, error)

QueryCollection executes a raw API call /api/v3/queryCollection

func (*Client) SubmitTransaction Uses

func (c *Client) SubmitTransaction(ops []*Operation) error

type Collection Uses

type Collection struct {
    Alive            bool                             `json:"alive"`
    Format           *CollectionFormat                `json:"format"`
    ID               string                           `json:"id"`
    Name             [][]string                       `json:"name"`
    ParentID         string                           `json:"parent_id"`
    ParentTable      string                           `json:"parent_table"`
    CollectionSchema map[string]*CollectionColumnInfo `json:"schema"`
    Version          int                              `json:"version"`

Collection describes a collection

type CollectionColumnInfo Uses

type CollectionColumnInfo struct {
    Name    string                    `json:"name"`
    Options []*CollectionColumnOption `json:"options"`
    Type    string                    `json:"type"`

CollectionColumnInfo describes a info of a collection column

type CollectionColumnOption Uses

type CollectionColumnOption struct {
    Color string `json:"color"`
    ID    string `json:"id"`
    Value string `json:"value"`

CollectionColumnOption describes options for a collection column

type CollectionFormat Uses

type CollectionFormat struct {
    CollectionPageProperties []*CollectionPageProperty `json:"collection_page_properties"`

CollectionFormat describes format of a collection

type CollectionPageProperty Uses

type CollectionPageProperty struct {
    Property string `json:"property"`
    Visible  bool   `json:"visible"`

CollectionPageProperty describes properties of a collection

type CollectionQuery Uses

type CollectionQuery struct {
    // copy from CollectionView.Query
    Aggregate  []*AggregateQuery `json:"aggregate"`
    GroupBy    interface{}       `json:"group_by"`
    CalendarBy interface{}       `json:"calendar_by"`
    // "and"
    FilterOperator string        `json:"filter_operator"`
    Filter         []interface{} `json:"filter"`
    Sort           []interface{} `json:"sort"`

CollectionQuery describes a collection query

type CollectionView Uses

type CollectionView struct {
    ID          string                `json:"id"`
    Alive       bool                  `json:"alive"`
    Format      *CollectionViewFormat `json:"format"`
    Name        string                `json:"name"`
    PageSort    []string              `json:"page_sort"`
    ParentID    string                `json:"parent_id"`
    ParentTable string                `json:"parent_table"`
    Query       *CollectionViewQuery  `json:"query"`
    Type        string                `json:"type"`
    Version     int                   `json:"version"`

CollectionView describes a collection

type CollectionViewFormat Uses

type CollectionViewFormat struct {
    TableProperties []*TableProperty `json:"table_properties"`
    TableWrap       bool             `json:"table_wrap"`

CollectionViewFormat describes a fomrat of a collection view

type CollectionViewInfo Uses

type CollectionViewInfo struct {
    CollectionView *CollectionView
    Collection     *Collection
    CollectionRows []*Block

CollectionViewInfo describes a particular view of the collection

type CollectionViewQuery Uses

type CollectionViewQuery struct {
    Aggregate []*AggregateQuery `json:"aggregate"`

CollectionViewQuery describes a query

type CollectionViewWithRole Uses

type CollectionViewWithRole struct {
    Role  string          `json:"role"`
    Value *CollectionView `json:"value"`

CollectionViewWithRole describes a role and a collection view

type CollectionWithRole Uses

type CollectionWithRole struct {
    Role  string      `json:"role"`
    Value *Collection `json:"value"`

CollectionWithRole describes a collection

type Date Uses

type Date struct {
    // "MMM DD, YYYY", "MM/DD/YYYY", "DD/MM/YYYY", "YYYY/MM/DD", "relative"
    DateFormat string    `json:"date_format"`
    Reminder   *Reminder `json:"reminder,omitempty"`
    // "2018-07-12"
    StartDate string `json:"start_date"`
    // "09:00"
    StartTime string `json:"start_time,omitempty"`
    // "2018-07-12"
    EndDate string `json:"end_date,omitempty"`
    // "09:00"
    EndTime string `json:"end_time,omitempty"`
    // "America/Los_Angeles"
    TimeZone *string `json:"time_zone,omitempty"`
    // "H:mm" for 24hr, not given for 12hr
    TimeFormat string `json:"time_format,omitempty"`
    // "date", "datetime", "datetimerange", "daterange"
    Type string `json:"type"`

Date describes a date

type DownloadFileResponse Uses

type DownloadFileResponse struct {
    Data   []byte
    Header http.Header

DownloadFileResponse is a result of DownloadFile()

type FormatBookmark Uses

type FormatBookmark struct {
    BookmarkIcon string `json:"bookmark_icon"`

FormatBookmark describes format for BlockBookmark

type FormatColumn Uses

type FormatColumn struct {
    ColumnRation float64 `json:"column_ratio"` // e.g. 0.5 for half-sized column

FormatColumn describes format for BlockColumn

type FormatEmbed Uses

type FormatEmbed struct {
    BlockFullWidth     bool    `json:"block_full_width"`
    BlockHeight        float64 `json:"block_height"`
    BlockPageWidth     bool    `json:"block_page_width"`
    BlockPreserveScale bool    `json:"block_preserve_scale"`
    DisplaySource      string  `json:"display_source"`

FormatEmbed describes format for BlockEmbed

type FormatImage Uses

type FormatImage struct {
    // comes from notion API
    BlockAspectRatio   float64 `json:"block_aspect_ratio"`
    BlockFullWidth     bool    `json:"block_full_width"`
    BlockPageWidth     bool    `json:"block_page_width"`
    BlockPreserveScale bool    `json:"block_preserve_scale"`
    BlockWidth         float64 `json:"block_width"`
    DisplaySource      string  `json:"display_source,omitempty"`

    // calculated by us
    ImageURL string `json:"image_url,omitempty"`

FormatImage describes format for BlockImage

type FormatPage Uses

type FormatPage struct {
    // /images/page-cover/gradients_11.jpg
    PageCover string `json:"page_cover"`
    // e.g. 0.6
    PageCoverPosition float64 `json:"page_cover_position"`
    PageFont          string  `json:"page_font"`
    PageFullWidth     bool    `json:"page_full_width"`
    // it's url like
    // or emoji like "✉️"
    PageIcon      string `json:"page_icon"`
    PageSmallText bool   `json:"page_small_text"`

    // calculated by us
    PageCoverURL string `json:"page_cover_url,omitempty"`

FormatPage describes format for TypePage

type FormatTable Uses

type FormatTable struct {
    TableWrap       bool             `json:"table_wrap"`
    TableProperties []*TableProperty `json:"table_properties"`

FormatTable describes format for BlockTable

type FormatText Uses

type FormatText struct {
    BlockColor *string `json:"block_color,omitempty"`

FormatText describes format for BlockText TODO: possibly more?

type FormatVideo Uses

type FormatVideo struct {
    BlockWidth         int64   `json:"block_width"`
    BlockHeight        int64   `json:"block_height"`
    DisplaySource      string  `json:"display_source"`
    BlockFullWidth     bool    `json:"block_full_width"`
    BlockPageWidth     bool    `json:"block_page_width"`
    BlockAspectRatio   float64 `json:"block_aspect_ratio"`
    BlockPreserveScale bool    `json:"block_preserve_scale"`

FormatVideo describes fromat form BlockVideo

type GetRecordValuesResponse Uses

type GetRecordValuesResponse struct {
    Results []*BlockWithRole `json:"results"`
    RawJSON []byte           `json:"-"`

GetRecordValuesResponse represents response to /api/v3/getRecordValues api Note: it depends on Table type in request

type GetSignedFileUrlsResponse Uses

type GetSignedFileUrlsResponse struct {
    SignedUrls []string `json:"signedUrls"`
    RawJSON    []byte   `json:"-"`

GetSignedFileUrlsResponse is a response of GetSignedFileUrls()

type InlineBlock Uses

type InlineBlock struct {
    Text string `json:"Text"`
    // compact representation of attribute flags
    AttrFlags AttrFlag `json:"AttrFlags,omitempty"`

    // represents link attribute
    Link string `json:"Link,omitempty"`
    // represents user attribute
    UserID string `json:"UserID,omitempty"`
    // represents comment block (I think)
    CommentID string `json:"CommentID,omitempty"`
    // represents date attribute
    Date *Date `json:"Date,omitempty"`
    // represents highlight (text or background) color.
    // text color looks like: "blue"
    // bg color looks like: "teal_background"
    Highlight string `json:"Highlight,omitempty"`

InlineBlock describes a nested inline block It's either Content or Type and Children

func ParseInlineBlocks Uses

func ParseInlineBlocks(raw interface{}) ([]*InlineBlock, error)

ParseInlineBlocks parses content from JSON into an easier to use form

func (*InlineBlock) IsPlain Uses

func (b *InlineBlock) IsPlain() bool

IsPlain returns true if this InlineBlock is plain text i.e. has no attributes

type LoadPageChunkResponse Uses

type LoadPageChunkResponse struct {
    RecordMap RecordMap `json:"recordMap"`
    Cursor    cursor    `json:"cursor"`
    RawJSON   []byte    `json:"-"`

LoadPageChunkResponse is a response to /api/v3/loadPageChunk api

type Loader Uses

type Loader struct {
    Type  string `json:"type"`
    Limit int    `json:"limit"`
    // from User.TimeZone
    UserTimeZone string `json:"userTimeZone"`
    // from User.Locale
    UserLocale string `json:"userLocale"`

Loader describes a loader

"loader": {
  "type": "table",
  "limit": 70,
  "userTimeZone": "America/Los_Angeles",
  "userLocale": "en"

type Operation Uses

type Operation struct {
    ID      string      `json:"id"`      // id of the block being modified
    Table   string      `json:"table"`   // "block" etc.
    Path    []string    `json:"path"`    // e.g. ["properties", "title"]
    Command string      `json:"command"` // "set", "update"
    Args    interface{} `json:"args"`

Operation describes a single operation sent

type Page Uses

type Page struct {
    ID  string
    // Root is a root block representing a page
    Root *Block
    // Users allows to find users that Page refers to by their ID
    Users  []*User
    Tables []*Table
    // contains filtered or unexported fields

Page describes a single Notion page

func (*Page) NotionURL Uses

func (p *Page) NotionURL() string

NotionURL returns url of this page on

func (*Page) SetFormat Uses

func (p *Page) SetFormat(args map[string]interface{}) error

SetFormat changes format properties of a page. Valid values are: page_full_width (bool), page_small_text (bool)

func (*Page) SetTitle Uses

func (p *Page) SetTitle(s string) error

SetTitle changes page title

type Permission Uses

type Permission struct {
    Role   string  `json:"role"`
    Type   string  `json:"type"`
    UserID *string `json:"user_id,omitempty"`

Permission describes user permissions

type QueryCollectionResponse Uses

type QueryCollectionResponse struct {
    RecordMap RecordMap              `json:"recordMap"`
    Result    *QueryCollectionResult `json:"result"`
    RawJSON   []byte                 `json:"-"`

QueryCollectionResponse is json response for /api/v3/queryCollection

type QueryCollectionResult Uses

type QueryCollectionResult struct {
    Type               string               `json:"type"`
    BlockIDS           []string             `json:"blockIds"`
    AggregationResults []*AggregationResult `json:"aggregationResults"`
    Total              int                  `json:"total"`

QueryCollectionResult is part of response for /api/v3/queryCollection

type RecordMap Uses

type RecordMap struct {
    Blocks          map[string]*BlockWithRole          `json:"block"`
    Space           map[string]*SpaceWithRole          `json:"space"`
    Users           map[string]*UserWithRole           `json:"notion_user"`
    Collections     map[string]*CollectionWithRole     `json:"collection"`
    CollectionViews map[string]*CollectionViewWithRole `json:"collection_view"`

RecordMap contains a collections of blocks, a space, users, and collections.

type Reminder Uses

type Reminder struct {
    Time  string `json:"time"` // e.g. "09:00"
    Unit  string `json:"unit"` // e.g. "day"
    Value int64  `json:"value"`

Reminder describes date reminder

type Space Uses

type Space struct {
    ID          string        `json:"id"`
    Version     float64       `json:"version"`
    Name        string        `json:"name"`
    BetaEnabled bool          `json:"beta_enabled"`
    Permissions *[]Permission `json:"permissions,omitempty"`
    Pages       []string      `json:"pages,omitempty"`

Space is a workspace.

type SpaceWithRole Uses

type SpaceWithRole struct {
    Role  string `json:"role,omitempty"`
    Value *Space `json:"value,omitempty"`

SpaceWithRole holds a user's role associated with a space and a space.

type Table Uses

type Table struct {
    CollectionView *CollectionView `json:"collection_view"`
    Collection     *Collection     `json:"collection"`
    Data           []*Block

Table represents a table (i.e. CollectionView)

type TableProperty Uses

type TableProperty struct {
    Width    int    `json:"width"`
    Visible  bool   `json:"visible"`
    Property string `json:"property"`

TableProperty describes property of a table

type User Uses

type User struct {
    Email                     string `json:"email"`
    FamilyName                string `json:"family_name"`
    GivenName                 string `json:"given_name"`
    ID                        string `json:"id"`
    Locale                    string `json:"locale"`
    MobileOnboardingCompleted bool   `json:"mobile_onboarding_completed"`
    OnboardingCompleted       bool   `json:"onboarding_completed"`
    ProfilePhoto              string `json:"profile_photo"`
    TimeZone                  string `json:"time_zone"`
    Version                   int    `json:"version"`

User describes a user

type UserWithRole Uses

type UserWithRole struct {
    Role  string `json:"role"`
    Value *User  `json:"value"`

UserWithRole describes a user and its role



Package notionapi imports 10 packages (graph) and is imported by 1 packages. Updated 2019-05-27. Refresh now. Tools for package owners.