An open API service indexing awesome lists of open source software.

https://github.com/flowerwrong/easemob-ruby

@dreprecated A rest client for easemob
https://github.com/flowerwrong/easemob-ruby

Last synced: 7 months ago
JSON representation

@dreprecated A rest client for easemob

Awesome Lists containing this project

README

          

# Easemob

环信 `restful api` ruby 客户端

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'easemob', github: 'FlowerWrong/easemob'
```

And then execute:

$ bundle

## Usage

```ruby
# rails_app/config/initializers/easemob.rb
Easemob.configure do |config|
config.client_id = ''
config.client_secret = ''
config.host = ''
config.org_name = ''
config.app_name = ''
end
$client = Easemob::Client.new

# Token, you need to store it yourself, eg: redis.
token_hash = $client.authorize
```

## rspec

```ruby
cp config.yml.example config.yml
# edit it
rake spec
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/FlowerWrong/easemob. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).