Zulip::Client
Installation
Add this line to your application's Gemfile:
gem 'zulip-client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zulip-client
Usage
Send message to stream:
client = Zulip::Client.new(site: "https://zulip.example.com/",
username: "[email protected]",
api_key: "xxxxxxxxxxxxx")
client.(type: :stream, to: "general", subject: "projects", content: "Hello, Zulip!")
Send private message to users:
client.(type: :private, to: "[email protected]", content: "Hello, Zulip!")
client.(type: :private, to: ["[email protected]", "[email protected]"], content: "Hello, Zulip!")
Receive all events:
client.each_event do |event|
p event
end
Receive message event:
client. do |event|
p event
end
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/okkez/zulip-client.
License
The gem is available as open source under the terms of the MIT License.