module Utils
Constants
- URLS
! defines utility functions and static variables for this application.
Public Instance Methods
build_payload(operations, request_ids)
click to toggle source
# File lib/notion_api/utils.rb, line 682 def build_payload(operations, request_ids) # ! properly formats the payload for Notions backend. # ! operations -> an array of hashes that define the operations to perform : ``Array[Hash]`` # ! request_ids -> the unique IDs for the request : ``str`` request_id = request_ids[:request_id] transaction_id = request_ids[:transaction_id] space_id = request_ids[:space_id] payload = { requestId: request_id, transactions: [ { id: transaction_id, shardId: 955_090, spaceId: space_id, operations: operations, }, ], } payload end