https://github.com/clear-code/ruby-zulip-client
Zulip client for Ruby
https://github.com/clear-code/ruby-zulip-client
ruby zulip zulip-client
Last synced: 4 months ago
JSON representation
Zulip client for Ruby
- Host: GitHub
- URL: https://github.com/clear-code/ruby-zulip-client
- Owner: clear-code
- License: mit
- Created: 2017-04-02T03:19:27.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-15T08:08:20.000Z (about 1 year ago)
- Last Synced: 2026-01-14T00:19:32.300Z (5 months ago)
- Topics: ruby, zulip, zulip-client
- Language: Ruby
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Zulip::Client
[Zulip](https://zulip.org/) client for [Ruby](https://www.ruby-lang.org/).
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'zulip-client'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install zulip-client
## Usage
Send message to stream:
```ruby
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:
```ruby
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:
```ruby
client.each_event do |event|
p event
end
```
Receive message event:
```ruby
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](http://opensource.org/licenses/MIT).