Class: Notion::Endpoints::Base
- Inherits:
-
Object
- Object
- Notion::Endpoints::Base
- Defined in:
- lib/notion/endpoints/base.rb
Direct Known Subclasses
Generated::Endpoints::Agents, Generated::Endpoints::AsyncTasks, Generated::Endpoints::Blocks, Generated::Endpoints::Comments, Generated::Endpoints::CustomEmojis, Generated::Endpoints::DataSources, Generated::Endpoints::Databases, Generated::Endpoints::FileUploads, Generated::Endpoints::MeetingNotes, Generated::Endpoints::Oauth, Generated::Endpoints::Pages, Generated::Endpoints::Search, Generated::Endpoints::Sessions, Generated::Endpoints::Users, Generated::Endpoints::Views
Class Method Summary collapse
- .operation(name, verb, template, path:, query:, query_rules:, body_rules:) ⇒ Object
- .operations ⇒ Object
Instance Method Summary collapse
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
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 |
.operations ⇒ Object
9 10 11 |
# File 'lib/notion/endpoints/base.rb', line 9 def operations @operations ||= {} end |