Class: NotionAPI::CollectionViewRow

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

Overview

class that represents each row in a CollectionView

Constant Summary

Constants included from Utils

Utils::URLS

Class Attribute Summary collapse

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(id, parent_id, collection_id, view_id) ⇒ CollectionViewRow

Returns a new instance of CollectionViewRow.



293
294
295
296
297
298
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 293

def initialize(id, parent_id, collection_id, view_id)
  @id = id
  @parent_id = parent_id
  @collection_id = collection_id
  @view_id = view_id
end

Class Attribute Details

.notion_typeObject (readonly)

Returns the value of attribute notion_type.



288
289
290
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 288

def notion_type
  @notion_type
end

.parent_idObject (readonly)

Returns the value of attribute parent_id.



288
289
290
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 288

def parent_id
  @parent_id
end

.typeObject (readonly)

Returns the value of attribute type.



288
289
290
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 288

def type
  @type
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



291
292
293
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 291

def id
  @id
end

#parent_idObject (readonly)

Returns the value of attribute parent_id.



291
292
293
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 291

def parent_id
  @parent_id
end

Instance Method Details

#inspectObject



283
284
285
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 283

def inspect
  "CollectionViewRow - id: #{self.id} - parent id: #{self.parent_id}"
end

#typeObject



279
280
281
# File 'lib/notion_api/notion_types/collection_view_blocks.rb', line 279

def type
  NotionAPI::CollectionViewRow.notion_type
end