<aside> đ Links (Block base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> âšī¸ â Table of Contents
</aside>
each â Enumerator
db.query_database
and other API list results returns a List object. The list object is an Enumerable object, so usually combines with .each
method. Each Page
or Block
object is automatically mapped to a Ruby object when passed to a Ruby block.
Notion API returns only the first page-size objects. The default page-size of this library is 100. The page-size can be changed in Query
object. Since the above .each
method is supported for paging, it will automatically execute API call that obtain the following page-size objects when you used the first page-size objects. Users do not have to worry about paging.
db.query_database(query).each do |page|
# exec some methods for a page object
end