Giter Club home page Giter Club logo

rocketchat-ruby's Introduction

Travis Build Status Maintainability Test Coverage Gem Version

Rocket.Chat REST API for Ruby

This is a gem wrapping the v1 REST API for Rocket.Chat.

The gem is based on a fork of http://github.com/int2xx9/ruby-rocketchat however that gem implemented v0.1 of the Rocket.Chat API and it was not forward compatible. Thanks to @int2xx9 for the framework on which this gem was based

Installation

Add this line to your application's Gemfile:

gem 'rocketchat'

And then execute:

$ bundle

Supported API calls

This gem supports the following Rocket.Chat APIs (Tested against Rocket.Chat v0.54)

Miscellaneous information

Authentication

Chat

IM

Channels

Groups

Users

Settings

Usage

info

To get Rocket.Chat version

require 'rocketchat'

rocket_server = RocketChat::Server.new('http://your.server.address/')
info = rocket_server.info
puts "Rocket.Chat version: #{info.version}"

authentication

To logout from a server:

require 'rocketchat'

rocket_server = RocketChat::Server.new('http://your.server.address/')
session = rocket_server.login('username', 'password')
# ... use the API ...
session.logout

debugging

To debug the communications between the gem and Rocket.Chat, there is a debug option. It accepts a stream for logging.

require 'rocketchat'

rocket_server = RocketChat::Server.new('http://your.server.address/', debug: $stderr)

For details of specific APIs:

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/abrom/rocketchat-ruby.

Note that spec tests are appreciated to minimise regressions. Before submitting a PR, please ensure that:

$ rspec

and

$ rubocop

both succeed

License

The gem is available as open source under the terms of the MIT License.

rocketchat-ruby's People

Contributors

abrom avatar reist avatar chrisstime avatar mrrti avatar cloverhearts avatar alinavancea avatar christianmoretti avatar hardik127 avatar nmagedman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.