Sha256: f5cdfb974c06b33df4bb4aba3dc2753dc46aa329109969349f4890bba566dd49
Contents?: true
Size: 995 Bytes
Versions: 2
Compression:
Stored size: 995 Bytes
Contents
# frozen_string_literal: true require "transactable" module Tana module Endpoints module Add # Adds a node to the graph. class Action include Import[:client] include Transactable # rubocop:todo Metrics/ParameterLists def initialize( request: Requests::Add.new, response: Responses::Root, model: Models::Root, ** ) @request = request @response = response @model = model super(**) end # rubocop:enable Metrics/ParameterLists def call(body, **) pipe body, validate(request), insert("addToNodeV2", at: 0), insert(**), to(client, :post), try(:parse, catch: JSON::ParserError), validate(response), to(model, :for) end private attr_reader :request, :response, :model end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tana-0.2.0 | lib/tana/endpoints/add/action.rb |
tana-0.1.0 | lib/tana/endpoints/add/action.rb |