Project

zulip

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

Development

~> 1.3
>= 0
>= 0
~> 2.4

Runtime

< 0.9, >= 0.7
 Project Readme

Zulip-Rb

A ruby interface to the Zulip API.

Installation

Add this line to your application's Gemfile:

gem 'zulip'

And then execute:

$ bundle

Or install it yourself as:

$ gem install zulip

Configuration

You can obtain your Zulip API key, create bots, and manage bots all from your Zulip settings page.

Set your api key and email address by passing a block to your Zulip::Client instance:

client = Zulip::Client.new do |config|
config.email_address = "YOUR_EMAIL_ADDRESS"
config.api_key = "YOUR_API_KEY"
end

Usage

Send messages to a stream:

client.send_message("Hey", "I'm posting to zulip", "test-stream")

Send private messages to one or more users:

client.send_private_message("hey I heard you like the internet", "bob@the-internet.net", "alice@the-information-superhighway.org")

Stream messages:

client.stream_messages do |message|
# Do some work
end

Get your current subscriptions:

client.get_subscriptions

Subscribe to a stream, passing the stream name:

client.subscribe "food"

List users:

client.get_users

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Some areas that could use contributions:

  1. Error handling
  2. Add unsubscribing from a stream