v0.3.0
Lots of adjustments in this new release. The goal is to bridge some of the delta between this SDK and the official JS SDK.
1. Error handling overhaul
When 4xx/5xx errors occur, they no longer return JSON responses to the client method. Instead, they raise an appropriate Notion
error.
Example using the new error classes:
def list_users
client.users.retrieve("invalid-id")
rescue Notion::APIResponseError => e
puts e.code
# "object_not_found"
end
2. Namespace updates to match notion-sdk-js
All Notion::Client
methods have been updated to match the JS SDK counterpart and align better with the official Notion API documentation. For example,
client.get_users
is now
client.users.list
and so on for all other methods in the SDK. The only method that wasn't changed was client#search
, since that already matched the Notion API.