Class: NotionRuby

Inherits:
Object
  • Object
show all
Includes:
API::Blocks, API::Databases, API::Pages, API::Search, API::Users
Defined in:
lib/notion_ruby.rb,
lib/notion_ruby/errors.rb,
lib/notion_ruby/version.rb,
lib/notion_ruby/api/pages.rb,
lib/notion_ruby/api/users.rb,
lib/notion_ruby/api/blocks.rb,
lib/notion_ruby/api/search.rb,
lib/notion_ruby/connection.rb,
lib/notion_ruby/api/databases.rb,
lib/notion_ruby/state_methods.rb,
lib/notion_ruby/resource_proxy.rb

Defined Under Namespace

Modules: API, CRUD Classes: BadGateway, BadRequest, Connection, Error, Forbidden, InternalServerError, NotAcceptable, NotFound, NotImplemented, ResourceProxy, ServiceUnavailable, Unauthorized, UnprocessableEntity

Constant Summary collapse

VERSION =
"0.1.1"
NOTION_VERSION =
"2021-05-13"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API::Users

#users

Methods included from API::Search

#search

Methods included from API::Pages

#pages

Methods included from API::Databases

#databases

Methods included from API::Blocks

#blocks

Constructor Details

#initialize(options = {}, &block) ⇒ NotionRuby

Returns a new instance of NotionRuby.



23
24
25
26
27
# File 'lib/notion_ruby.rb', line 23

def initialize(options = {}, &block)
  @options = options
  @block = block if block
  @connection = NotionRuby::Connection.new(options, &block)
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



15
16
17
# File 'lib/notion_ruby.rb', line 15

def connection
  @connection
end