TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'pomelo_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pomelo_client
require 'pomelo_client'
p 'test start'
client = PomeloClient::Client.new('127.0.0.1', '3014')
client.request('gate.gateHandler.queryEntry', { uid: 1, rid: 1 }) do |msg|
client.close
client = PomeloClient::Client.new(msg['host'], msg['port'])
client.request('connector.entryHandler.enter', { auth_token: '99832fb54a0d602897ce4ce5ed4400d4'}) do |message|
client.on('onChat') do |m|
p m
end
client.request("chat.chatHandler.send", { content: 'xxoo', from: 'xingxing', type: 'text', gender: '1' }) do |mm|
p mm
end
end
end
- Fork it ( http://github.com//pomelo_client/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request