Skip to content

connorkuehnle/stream-chat-ruby

 
 

Repository files navigation

stream-chat-ruby

Build Status Gem Version

stream-chat-ruby is the official Ruby client for Stream chat a service for building chat applications.

You can sign up for a Stream account at https://getstream.io/chat/get_started/.

You can use this library to access chat API endpoints server-side. For the client-side integrations (web and mobile) have a look at the Javascript, iOS and Android SDK libraries (https://getstream.io/chat/).

Installation

stream-chat-ruby supports:

  • Ruby (2.6, 2.5, 2.4)

Install

gem install stream-chat-ruby

Documentation

Official API docs

How to build a chat app with Ruby tutorial

TODO: add a sample Ruby chat program

Supported features

  • Chat channels
  • Messages
  • Chat channel types
  • User management
  • Moderation API
  • Push configuration
  • User devices
  • User search
  • Channel search

Quickstart

chat = StreamChat::Client.new(api_key='STREAM_KEY', api_secret='STREAM_SECRET')

# add a user
chat.update_user({'id' => 'chuck', 'name' => 'Chuck'})

# create a channel about kung-fu
channel = chat.channel('messaging', 'kung-fu')
channel.create('chuck')

# add a first message to the channel
channel.send_message({'text' => 'AMA about kung-fu'})

Contributing

First, make sure you can run the test suite. Tests are run via rspec

STREAM_KEY=my_api_key STREAM_SECRET=my_api_secret bundle exec rake spec

Releasing a new version

In order to release new version you need to be a maintainer of the library.

  • Update CHANGELOG
  • Update the version in lib/stream-chat/version.rb
  • Commit and push to GitHub
  • Build the gem with bundle exec rake build
  • Publish the gem with bundle exec rake release

About

Stream Chat official Ruby API Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%