Class: Notion::Client
- Inherits:
-
Object
- Object
- Notion::Client
- Includes:
- Api::Endpoints, Faraday::Connection, Faraday::Request
- Defined in:
- lib/notion/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Api::Endpoints::Comments
#create_comment, #retrieve_comments
Methods included from Api::Endpoints::Search
Methods included from Api::Endpoints::Users
Methods included from Api::Endpoints::Pages
#create_page, #page, #page_property_item, #update_page
Methods included from Api::Endpoints::Databases
#create_database, #database, #database_query, #update_database
Methods included from Api::Endpoints::Blocks
#block, #block_append_children, #block_children, #delete_block, #update_block
Methods included from Faraday::Request
#delete, #get, #patch, #post, #put
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 |
# File 'lib/notion/client.rb', line 10 def initialize( = {}) Notion::Config::ATTRIBUTES.each do |key| send("#{key}=", .fetch(key, Notion.config.send(key))) end @logger ||= Notion::Config.logger || Notion::Logger.default @token ||= Notion.config.token end |