Sha256: 7cf23c3991fb5ba79f7e05667cc79c1b25babf9a4f7efe5d125b81486ec6997a
Contents?: true
Size: 490 Bytes
Versions: 3
Compression:
Stored size: 490 Bytes
Contents
module Pytty module Client module Api class Signal 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 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pytty-0.5.0 | lib/pytty/client/api/signal.rb |
pytty-0.4.1 | lib/pytty/client/api/signal.rb |
pytty-0.4.0 | lib/pytty/client/api/signal.rb |