notion_api library

A wrapper for the public beta Notion API to manage it like a Notion SDK package for dart.

To see code examples you can go to https://pub.dev/packages/notion_api/example.

Documentation for Notion API here https://developers.notion.com. API Reference here https://developers.notion.com/reference/intro.

Classes

Block
A base representation of any Notion block object.
BulletedListItem
A representation of the Bulleted List Item Notion block object;
Children
A representation of the children Notion object. Also list of blocks.
Client
A Notion API client.
Database
A representation of the Databse Notion object.
Heading
A representation of the Heading Notion block object.
MultiSelectOption
A representation of a multi select option property for any Notion object.
MultiSelectProp
A representation of the multi select Notion object.
NotionBlockClient
A client for Notion API block children requests.
NotionDatabasesClient
A client for Notion API databases requests.
NotionPagesClient
A client for Notion API pages requests.
NotionResponse
A representation of the Response from the Notion API.
NumberedListItem
A representation of the Bulleted List Item Notion block object;
Page
A representation of the Page Notion object.
Pagination
A representation of the pagination response from the Notion API. Also list of objects.
Paragraph
A representation of the Paragraph Notion block object.
Parent
A representation of the parent json field for the Notion API.
Properties
A representation of the properties for any Notion object.
Property
A representation of a single property for any Notion object.
RichTextProp
A representation of a rich text property for any Notion object.
Text
A representation of the Rich Text Notion.
TextAnnotations
The text style.
TitleProp
A representation of a title property for any Notion object.
ToDo
A representation of the Paragraph Notion block object.
Toggle
A representation of the Bulleted List Item Notion block object;

Enums

BlockTypes
The basic notion types.
ColorsTypes
The basic colors.
ObjectTypes
The notion objects types.
ParentType
The parent types for pages objects.
PropertiesTypes
The notion objects properties types.

Constants

all_str_property_types → const List<String>
The string values of all properties types.
blocks → const List<BlockTypes>
colors → const List<ColorsTypes>
objects → const List<ObjectTypes>
properties → const List<PropertiesTypes>

Properties

headingsTypes List<BlockTypes>
The heading types.
no setter

Functions

blockTypeToString(BlockTypes type) String
Returns the string value of the given block type.
colorTypeToString(ColorsTypes color) String
Returns the string value of the given color type.
extractPropertyType(Map<String, dynamic> json) PropertiesTypes
Extract the property type of a json property.
fieldIsList(dynamic field) bool
Find if a json field is a List
objectTypeToString(ObjectTypes type) String
Returns the string value of the given object type.
parentTypeToString(ParentType type) String
Returns the string value of the given parent type.
propertyTypeToString(PropertiesTypes type) String
Returns the string value of the given property type.
stringToBlockType(String type) BlockTypes
Returns the block type of the given block type string.
stringToColorType(String color) ColorsTypes
Returns the color type of the given color type string.
stringToObjectType(String type) ObjectTypes
Returns the object type of the given object type string.
stringToParentType(String type) ParentType
Returns the parent type of the given parent type string.
stringToPropertyType(String type) PropertiesTypes
Returns the property type of the given property type string.