Class: Notion::Client

Inherits:
Object
  • Object
show all
Includes:
Operations::Search, RequestClient
Defined in:
lib/notion-sdk-ruby/client.rb

Instance Method Summary collapse

Methods included from Operations::Search

#search

Methods included from RequestClient

#delete, #get, #patch, #post

Constructor Details

#initialize(token:, notion_version: "2021-08-16") ⇒ Client

Returns a new instance of Client.


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

def initialize(token:, notion_version: "2021-08-16")
  Notion.api_token = token
  Notion.notion_version = notion_version
end

Instance Method Details

#blocksObject


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

def blocks
  Blocks.new
end

#databasesObject


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

def databases
  Databases.new
end

#pagesObject


19
20
21
# File 'lib/notion-sdk-ruby/client.rb', line 19

def pages
  Pages.new
end

#usersObject


23
24
25
# File 'lib/notion-sdk-ruby/client.rb', line 23

def users
  Users.new
end