Module: NotionRuby::API::Pages

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

Defined Under Namespace

Classes: Proxy

Instance Method Summary collapse

Instance Method Details

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



16
17
18
19
20
# File 'lib/notion_ruby/api/pages.rb', line 16

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