Skip to content

raws/wonder-llama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wonder Llama

Wonder Llama is a Zulip API client for Ruby. It's simple to use, depends only on Ruby's standard library, and is well-tested.

It's called Wonder Llama because LevelUp's Zulip bot, for which this library was built, is named Ralph.

Usage

You'll need a Zulip API key.

require 'wonder_llama'

client = WonderLlama::Client.new(host: 'example.zulipchat.com',
  email: '[email protected]', api_key: 's3cr3t')

client.send_message(type: 'stream', to: 'social', topic: 'greetings',
  content: 'hello world!')

client.send_message(type: 'private', to: '[email protected]',
  content: 'thanks for the accidental deployment :robot:')

client.stream_events do |event|
  if event.is_a?(WonderLlama::MessageEvent)
    message = event.message
    puts message.content
  end
end

client.users.each do |user|
  puts "#{user.id}: #{user.full_name} (#{user.email})"
end

Check out the examples directory for more.

Contributing

Contributions are welcome!

To run the tests, install the development dependencies and use bin/rspec.

bundle install
bin/rspec

License

MIT

About

Zulip API client for Ruby

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages