Sha256: 564f75e1e7804e94a934478e498e6dcf440c71a286e7f61d7ecbfacb95ddecef
Contents?: true
Size: 1004 Bytes
Versions: 1
Compression:
Stored size: 1004 Bytes
Contents
# frozen_string_literal: true require "pipeable" module Tana module Endpoints module Add # Adds a node to the graph. class Action include Dependencies[:client] include Pipeable # 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, as: :to_h), to(model, :for) end private attr_reader :request, :response, :model end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tana-0.14.0 | lib/tana/endpoints/add/action.rb |