Module: NotionRuby::API::Databases

Included in:
NotionRuby
Defined in:
lib/notion_ruby/api/databases.rb

Defined Under Namespace

Classes: Proxy

Instance Method Summary collapse

Instance Method Details

#databases(id = nil, params = {}) ⇒ Object



12
13
14
15
16
# File 'lib/notion_ruby/api/databases.rb', line 12

def databases(id = nil, params = {})
  params = id if id.is_a? Hash
  path_prefix = !id.is_a?(Hash) && id ? "/v1/databases/#{id}" : "/v1/databases"
  Proxy.new(connection, path_prefix, params)
end