Class: NotionAPI::Client

Inherits:
Core
  • Object
show all
Defined in:
lib/notion_api/client.rb

Overview

acts as the ‘main interface’ to the methods of this package.

Constant Summary

Constants included from Utils

Utils::URLS

Instance Attribute Summary collapse

Attributes inherited from Core

#clean_id, #cookies, #headers

Instance Method Summary collapse

Methods inherited from Core

#children, #children_ids, #get_page

Methods included from Utils

#build_payload

Constructor Details

#initialize(token_v2, active_user_header = nil) ⇒ Client

Returns a new instance of Client.



11
12
13
14
15
# File 'lib/notion_api/client.rb', line 11

def initialize(token_v2, active_user_header = nil)
  @token_v2 = token_v2
  @active_user_header = active_user_header
  super(token_v2, active_user_header)
end

Instance Attribute Details

#active_user_headerObject (readonly)

Returns the value of attribute active_user_header.



9
10
11
# File 'lib/notion_api/client.rb', line 9

def active_user_header
  @active_user_header
end

#token_v2Object (readonly)

Returns the value of attribute token_v2.



9
10
11
# File 'lib/notion_api/client.rb', line 9

def token_v2
  @token_v2
end