Class: Notion::Client

Inherits:
Object
  • Object
show all
Includes:
Api::SearchMethods
Defined in:
lib/notion-sdk-ruby/client.rb

Instance Method Summary collapse

Methods included from Api::SearchMethods

#search

Constructor Details

#initialize(token:, notion_version: "2022-02-22") ⇒ Client

Returns a new instance of Client.



5
6
7
8
# File 'lib/notion-sdk-ruby/client.rb', line 5

def initialize(token:, notion_version: "2022-02-22")
  Notion.api_token = token
  Notion.notion_version = notion_version
end

Instance Method Details

#blocksNotion::Api::BlocksMethods



21
22
23
# File 'lib/notion-sdk-ruby/client.rb', line 21

def blocks
  Api::BlocksMethods.new
end

#databasesNotion::Api::DatabasesMethods



11
12
13
# File 'lib/notion-sdk-ruby/client.rb', line 11

def databases
  Api::DatabasesMethods.new
end

#pagesNotion::Api::PagesMethods



26
27
28
# File 'lib/notion-sdk-ruby/client.rb', line 26

def pages
  Api::PagesMethods.new
end

#usersNotion::Api::UsersMethods



16
17
18
# File 'lib/notion-sdk-ruby/client.rb', line 16

def users
  Api::UsersMethods.new
end