class Pytty::Client::Api::Signal
Public Class Methods
run(id:, signal:)
click to toggle source
# File lib/pytty/client/api/signal.rb, line 5 def self.run(id:, signal:) internet = Async::HTTP::Internet.new headers = [['accept', 'application/json']] body = { signal: signal }.to_json response = internet.post("#{Pytty::Client.host_url}/v1/signal/#{id}", headers, [body]) [response, JSON.parse(response.read)] ensure internet.close end