Skip to content

Releases: ayvi-0001/notion-api

v0.7.4

30 Mar 19:38
Compare
Choose a tag to compare

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

17 Mar 06:16
Compare
Choose a tag to compare

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 the query_all() method introduced in v0.6.0 was renamed to query().
  • The old query_pages() method was renamed to _query_pages(), and the query_all_pages() method introduced in v0.6.0 was renamed to query_pages().

Replaced retrieve comment method for notion.Workspace

  • The old retrieve_comments() method was renamed to _retrieve_comments(), and the retrieve_all_comments() method introduced in v0.6.0 was renamed to retrieve_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 a JSONDecodeError. Now it will show what the error actually was.
  • Added the title_column param for notion.Database.create. This is the same as the name_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 in notion.Page.create.
  • Updated retrieve_user method for notion.Workspace to return a dictionary instead of UserObject.
  • Removed the optional dependency orjson.
  • Removed cached_properties.
  • Added option/file objects to the properties module that were missing.
  • Added the name param to the ExternalFile object. This was missing and need when using notion.Page.set_files().

v0.6.0

31 Jul 00:52
Compare
Choose a tag to compare

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 and invalid_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

30 Apr 05:18
Compare
Choose a tag to compare

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 to notion.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 and notion.properties.
  • Remove filter_property_values from Database query_pages().

Additions:

  • Add remaining block types (Table, TableRows, Video, Image).
  • Add examples for block extensions.

Fixes:

  • Update strike param in Annotations to strikethrough.
  • Remove Equation param for rich_text sequences.

v0.4.0-alpha

18 Apr 06:03
Compare
Choose a tag to compare

v0.3.12-alpha...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

05 Apr 14:32
Compare
Choose a tag to compare

v0.3.9-alpha...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 from inline to is_inline.

PyPI notion-api v-0.3.12-alpha

v0.3.9-alpha

02 Apr 16:36
Compare
Choose a tag to compare
v0.3.9-alpha Pre-release
Pre-release

v0.3.8-alpha...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.

PyPI notion-api 0.3.9

v0.3.8-alpha

01 Apr 22:09
Compare
Choose a tag to compare
v0.3.8-alpha Pre-release
Pre-release

v0.3.7-alpha...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.

PyPI notion-api v0.3.8-alpha

Initial Release: v0.3.1-alpha

25 Mar 18:58
Compare
Choose a tag to compare