0.01
No commit activity in last 3 years
No release in over 3 years
Zulip client for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 12.0
>= 3.2.0

Runtime

>= 0.11.0
~> 1.1.0
 Project Readme

Zulip::Client

Zulip client for Ruby.

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: "test-bot@zulip.example.com",
                           api_key: "xxxxxxxxxxxxx")
client.send_message(type: :stream, to: "general", subject: "projects", content: "Hello, Zulip!")

Send private message to users:

client.send_message(type: :private, to: "user@zulip.example.com", content: "Hello, Zulip!")
client.send_message(type: :private, to: ["user1@zulip.example.com", "user2@zulip.example.com"], content: "Hello, Zulip!")

Receive all events:

client.each_event do |event|
  p event
end

Receive message event:

client.each_message 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.