require "rest_client"

module CatsocketClient
  class Publisher < Struct.new(:url, :api_key)

    def publish(channel, data)
      RestClient.post(url, channel: channel, data: data )
    end

  end
end

require "rest_client"

module CatsocketClient
  class Publisher < Struct.new(:url, :api_key)

    def publish(channel, data)
      RestClient.post(url, guid: 0, api_key: api_key, channel: channel, data: data )
    end

  end
end

Send GUID & API key
Send GUID & API key
