Class: Notion::Endpoints::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/notion/endpoints/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Base

Returns a new instance of Base.



25
26
27
# File 'lib/notion/endpoints/base.rb', line 25

def initialize(client)
  @client = client
end

Class Method Details

.operation(name, verb, template, path:, query:, query_rules:, body_rules:) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/notion/endpoints/base.rb', line 13

def operation(name, verb, template, path:, query:, query_rules:, body_rules:)
  operations[name] = {
    verb: verb,
    path: template,
    path_params: path,
    query_params: query,
    query_rules: query_rules,
    body_rules: body_rules
  }
end

.operationsObject



9
10
11
# File 'lib/notion/endpoints/base.rb', line 9

def operations
  @operations ||= {}
end