ChatopsRPC Client
This is a client implementation of the Chatops RPC Protocol V3.
Usage
ENV["CHATOPS_AUTH_PRIVATE_KEY"] = "..."
require_relative "lib/chatops-rpc/client.rb"
config = {
endpoints: [
{ endpoint: "http://localhost:8889/_example" },
{ endpoint: "http://localhost:8889/_hello_world" }
]
}
c = ChatopsRPC::Client.new config
# chat(chatop, user, (optional) room-id)
resp = c.chat "example echo hi", "anglinb", "#room-id"
resp. # hi
resp.success? # true