README.md in telepost-0.1.0 vs README.md in telepost-0.2.0
- old
+ new
@@ -2,11 +2,11 @@
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/telepost)](http://www.rultor.com/p/yegor256/telepost)
[![We recommend RubyMine](http://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
[![Build Status](https://travis-ci.org/yegor256/telepost.svg)](https://travis-ci.org/yegor256/telepost)
[![Gem Version](https://badge.fury.io/rb/telepost.svg)](http://badge.fury.io/rb/telepost)
-[![Maintainability](https://api.codeclimate.com/v1/badges/5528e182bb5e4a2ecc1f/maintainability)](https://codeclimate.com/github/yegor256/telepost/maintainability)
+[![Maintainability](https://api.codeclimate.com/v1/badges/21aec58faee3866bdfbb/maintainability)](https://codeclimate.com/github/yegor256/telepost/maintainability)
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/telepost/master/frames)
Telepost is a simple gateway to Telegram, which can post messages and respond to primitive requests.
First, install it:
@@ -19,11 +19,13 @@
```ruby
require 'telepost'
require 'logger'
tp = Telepost.new('..token..')
-tp.run do |chat, msg|
- tp.post(chat: chat, 'Thanks for talking to me!')
+Thread.start do
+ tp.run do |chat, msg|
+ tp.post(chat: chat, 'Thanks for talking to me!')
+ end
end
tp.post(chat: 12345, 'How are you?', 'How are you doing?')
```
That's it.