Releases: ayvi-0001/notion-api
v0.7.4
Full Changelog: v0.7.0...v0.7.4
v0.7.4 | Bug Fixes | Update documentation | Optimizations
-
Update readme examples. | Remove license from pyproject dynamic.
-
Fix RichTextBlock set_text method, remove new
request_id
key returned by Notion. | Fix typo causing page title error. -
propertyitem bug fixes. | Change propertyitem return values to return None. | Update propertyitem repr to return json value.
-
Add property_id param to Page.retrieve_property_item(). | Optimize retrieving page property items. | Update repr's
-
Update notion.Block classmethods to accept strings, and use empty string defaults.
v0.7.0
Full Changelog: v0.6.0...v0.7.0
https://pypi.org/project/notion-api/0.7.0/
Breaking Changes:
Replaced query methods for notion.Database
.
- The old
query()
method was renamed to_query()
, and thequery_all()
method introduced in v0.6.0 was renamed toquery()
. - The old
query_pages()
method was renamed to_query_pages()
, and thequery_all_pages()
method introduced in v0.6.0 was renamed toquery_pages()
.
Replaced retrieve comment method for notion.Workspace
- The old
retrieve_comments()
method was renamed to_retrieve_comments()
, and theretrieve_all_comments()
method introduced in v0.6.0 was renamed toretrieve_comments()
.
Changes:
- Added additional error handling when a response doesn't return a valid json.
There has been an issue with the Notion API for several months where it returns an html response for a Gateway time-out error.
This wasn't handled in the http requests and all it did was return aJSONDecodeError
. Now it will show what the error actually was. - Added the
title_column
param fornotion.Database.create
. This is the same as thename_column
param, which will remain until it's removed in a future update. The default value was also changed from "Name" to "title". - Added a default empty string for the
page_title
param innotion.Page.create
. - Updated
retrieve_user
method fornotion.Workspace
to return a dictionary instead ofUserObject
. - Removed the optional dependency
orjson
. - Removed cached_properties.
- Added option/file objects to the
properties
module that were missing. - Added the
name
param to theExternalFile
object. This was missing and need when usingnotion.Page.set_files()
.
v0.6.0
Full Changelog: v0.5.0-alpha...v0.6.0
https://pypi.org/project/notion-api/0.6.0/
Changes/Additions:
- New methods;
query_all()
&query_all_pages()
for notion.Database. These handle pagination and will replace the previous versions in a later update. Previous methods are pending deprecation. - New methods;
retrieve_all_comments()
for notion.Workspace. This handles pagination and will replace the previous version in a later update. Previous method is pending deprecation. - New
after
parameter for appending block endpoints. These are present in all notion.Block class methods. - 2 new error codes:
gateway_timeout
andinvalid_grant
. - New
public_url
property added to Page/Database.
Fixes
- error in retrieving a date_formula property item.
- error in Sort filter.
v0.5.0-alpha
Full Changelog: v0.4.1-alpha...v0.5.0-alpha
https://pypi.org/project/notion-api/0.5.0/
Changes:
- Removed class
notion.BlockFactory
. Block creation methods moved tonotion.Block
classmethods. - Updated name for creating synced blocks: new_synced_block -> original_synced_block | reference_synced_block -> duplicate_synced_block
- Add block extension module with classes:
CodeBlock
,RichTextBlock
,TableBlock
,EquationBlock
,ToDoBlock
- Revised module exports from
notion
andnotion.properties
. - Remove
filter_property_values
from Databasequery_pages()
.
Additions:
- Add remaining block types (Table, TableRows, Video, Image).
- Add examples for block extensions.
Fixes:
- Update
strike
param inAnnotations
tostrikethrough
. - Remove
Equation
param for rich_text sequences.
v0.4.0-alpha
https://pypi.org/project/notion-api/0.4.0/
Additions:
Add setters to Database
for database description, inline status.
Add setters to Database
and Page
for cover/icon.
Add query_pages
method to Database. Same parameters as query
method, but retrieves page ids in results and returns a list of Page objects.
Add getattr to page to search from property items
Add propertyitems module with helper functions to retrieve values from property items
Changes:
Client checks for environment variable TZ
for timezone info.
Remove log messages.
delete_self
property in Block
does not return the deleted block anymore, returns none.
Fixes:
Remove redundant errors. Switch incorrect notion errors for Type/Value errors.
Remove 2nd cached property in Page
.
Clarify docstrings in database and page methods.
v0.3.12-alpha
- Changed the logging messages from INFO to DEBUG
- Removed staticmethods from
notion.Workspace
. Now requires an instance. - Removed the parameter
notion_version
from all classes. Will default to the current version (2022-06-28). To use a previous version of the API,NOTION_VERSION
can be set as an environment variable. - Minor fixes to property objects/page property values and default values. Moved url's in docstrings to the Page/Database methods.
- Renamed attribute in
notion.Database
frominline
tois_inline
.
v0.3.9-alpha
Changed Database Query method. Added parameters for limiting page size and starting at a cursor.
Removed the parameter payload
and added separate options for filter/sorts.
method will combine them instead of using helper function.
v0.3.8-alpha
- Minor edits & formatting to code/docstrings/imports.
- Revised config in pypyroject.toml.
- Corrected a typo in
notion.api.notiondatabase.Database
methods. - Added separate function to check package version vs latest version on PyPI.